Merge remote-tracking branch 'upstream/master' into judgement-revamp

This commit is contained in:
Dean Herbert
2017-09-12 17:37:37 +09:00
53 changed files with 1341 additions and 164 deletions

View File

@ -14,6 +14,7 @@ using System;
using osu.Framework.Input.Bindings;
using osu.Game.Rulesets.UI;
using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Rulesets.Judgements;
namespace osu.Game.Rulesets.Mania.UI
{
@ -35,6 +36,9 @@ namespace osu.Game.Rulesets.Mania.UI
private readonly Container hitTargetBar;
private readonly Container keyIcon;
internal readonly Container TopLevelContainer;
private readonly Container explosionContainer;
protected override Container<Drawable> Content => content;
private readonly Container<Drawable> content;
@ -97,6 +101,11 @@ namespace osu.Game.Rulesets.Mania.UI
{
Pressed = onPressed,
Released = onReleased
},
explosionContainer = new Container
{
Name = "Hit explosions",
RelativeSizeAxes = Axes.Both
}
}
},
@ -135,8 +144,11 @@ namespace osu.Game.Rulesets.Mania.UI
}
}
}
}
},
TopLevelContainer = new Container { RelativeSizeAxes = Axes.Both }
};
TopLevelContainer.Add(explosionContainer.CreateProxy());
}
public override Axes RelativeSizeAxes => Axes.Y;
@ -193,6 +205,14 @@ namespace osu.Game.Rulesets.Mania.UI
HitObjects.Add(hitObject);
}
public override void OnJudgement(DrawableHitObject judgedObject, Judgement judgement)
{
if (!judgement.IsHit)
return;
explosionContainer.Add(new HitExplosion(judgedObject));
}
private bool onPressed(ManiaAction action)
{
if (action == Action)