Move swells on top of the playfield when they reach the hit target.

This commit is contained in:
smoogipooo
2017-03-29 09:01:40 +09:00
parent 6bee57c94f
commit 7fc68864be
2 changed files with 29 additions and 6 deletions

View File

@ -14,6 +14,7 @@ using osu.Game.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics.Primitives;
using osu.Game.Modes.Taiko.Objects.Drawable;
namespace osu.Game.Modes.Taiko.UI
{
@ -52,7 +53,7 @@ namespace osu.Game.Modes.Taiko.UI
private readonly Container<DrawableTaikoJudgement> judgementContainer;
private readonly Container hitObjectContainer;
//private Container topLevelHitContainer;
private Container topLevelHitContainer;
private readonly Container leftBackgroundContainer;
private readonly Container rightBackgroundContainer;
private readonly Box leftBackground;
@ -154,10 +155,10 @@ namespace osu.Game.Modes.Taiko.UI
},
}
},
//topLevelHitContainer = new Container
//{
// RelativeSizeAxes = Axes.Both,
//}
topLevelHitContainer = new Container
{
RelativeSizeAxes = Axes.Both,
}
});
}
@ -177,6 +178,11 @@ namespace osu.Game.Modes.Taiko.UI
h.Scale = new Vector2(PLAYFIELD_SCALE);
base.Add(h);
// Swells should be moved at the very top of the playfield when they reach the hit target
var swell = h as DrawableSwell;
if (swell != null)
swell.OnStart += () => topLevelHitContainer.Add(swell.CreateProxy());
}
public override void OnJudgement(DrawableHitObject<TaikoHitObject, TaikoJudgement> judgedObject)