Make HitRenderer not have a publicly-settable Beatmap, replace AllObjectsJudged for performance.

This commit is contained in:
smoogipooo
2017-03-10 15:08:53 +09:00
parent e5bde712ed
commit 02281d8a2a
10 changed files with 91 additions and 71 deletions

View File

@ -1,13 +1,13 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Modes.Mania.UI;
using osu.Game.Modes.Objects;
using osu.Game.Modes.Osu.UI;
using osu.Game.Modes.UI;
using osu.Game.Beatmaps;
using System.Collections.Generic;
namespace osu.Game.Modes.Mania
{
@ -15,10 +15,7 @@ namespace osu.Game.Modes.Mania
{
public override ScoreOverlay CreateScoreOverlay() => new OsuScoreOverlay();
public override HitRenderer CreateHitRendererWith(Beatmap beatmap) => new ManiaHitRenderer
{
Beatmap = beatmap,
};
public override HitRenderer CreateHitRendererWith(Beatmap beatmap) => new ManiaHitRenderer(beatmap);
public override IEnumerable<Mod> GetModsFor(ModType type)
{

View File

@ -1,6 +1,7 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Beatmaps;
using osu.Game.Modes.Mania.Objects;
using osu.Game.Modes.Objects;
using osu.Game.Modes.Objects.Drawables;
@ -12,7 +13,8 @@ namespace osu.Game.Modes.Mania.UI
{
private readonly int columns;
public ManiaHitRenderer(int columns = 5)
public ManiaHitRenderer(Beatmap beatmap, int columns = 5)
: base(beatmap)
{
this.columns = columns;
}