mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 17:42:54 +08:00
Implement basic logic
This commit is contained in:
parent
c69e88eb97
commit
5b115d8d8a
osu.Game/Screens/Play/HUD
@ -77,6 +77,19 @@ namespace osu.Game.Screens.Play.HUD
|
||||
case ScoreMeterType.HitErrorRight:
|
||||
createBar(true);
|
||||
break;
|
||||
|
||||
case ScoreMeterType.ColourBoth:
|
||||
createColour(false);
|
||||
createColour(true);
|
||||
break;
|
||||
|
||||
case ScoreMeterType.ColourLeft:
|
||||
createColour(false);
|
||||
break;
|
||||
|
||||
case ScoreMeterType.ColourRight:
|
||||
createColour(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -90,6 +103,24 @@ namespace osu.Game.Screens.Play.HUD
|
||||
Alpha = 0,
|
||||
};
|
||||
|
||||
completeDisplayLoading(display);
|
||||
}
|
||||
|
||||
private void createColour(bool rightAligned)
|
||||
{
|
||||
var display = new ColourHitErrorMeter(hitWindows)
|
||||
{
|
||||
Margin = new MarginPadding(margin),
|
||||
Anchor = rightAligned ? Anchor.CentreRight : Anchor.CentreLeft,
|
||||
Origin = rightAligned ? Anchor.CentreRight : Anchor.CentreLeft,
|
||||
Alpha = 0,
|
||||
};
|
||||
|
||||
completeDisplayLoading(display);
|
||||
}
|
||||
|
||||
private void completeDisplayLoading(HitErrorMeter display)
|
||||
{
|
||||
Add(display);
|
||||
display.FadeInFromZero(fade_duration, Easing.OutQuint);
|
||||
}
|
||||
|
@ -0,0 +1,33 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Colour;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Rulesets.Judgements;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Screens.Play.HUD.HitErrorMeters
|
||||
{
|
||||
public class ColourHitErrorMeter : HitErrorMeter
|
||||
{
|
||||
public ColourHitErrorMeter(HitWindows hitWindows)
|
||||
: base(hitWindows)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void OnNewJudgement(JudgementResult judgement)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user