1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 15:12:57 +08:00

Implement basic logic

This commit is contained in:
Andrei Zavatski 2019-12-21 13:41:50 +03:00
parent c69e88eb97
commit 5b115d8d8a
2 changed files with 64 additions and 0 deletions

View File

@ -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);
}

View File

@ -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();
}
}
}