mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +09:00
Merge remote-tracking branch 'origin/master' into refactor_hitrenderer
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
// 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;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Transforms;
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using System;
|
||||
|
||||
namespace osu.Game.Modes.UI
|
||||
{
|
||||
@ -31,7 +31,7 @@ namespace osu.Game.Modes.UI
|
||||
|
||||
public override void Increment(ulong amount)
|
||||
{
|
||||
Count = Count + amount;
|
||||
Current.Value = Current + amount;
|
||||
}
|
||||
|
||||
protected class TransformComboResult : Transform<ulong>
|
||||
|
@ -7,7 +7,6 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Modes.Objects;
|
||||
using osu.Game.Screens.Play;
|
||||
using System;
|
||||
|
||||
@ -29,19 +28,6 @@ namespace osu.Game.Modes.UI
|
||||
protected abstract ScoreCounter CreateScoreCounter();
|
||||
protected abstract HealthDisplay CreateHealthDisplay();
|
||||
|
||||
public virtual void OnHit(HitObject h)
|
||||
{
|
||||
ComboCounter?.Increment();
|
||||
ScoreCounter?.Increment(300);
|
||||
AccuracyCounter?.Set(Math.Min(1, AccuracyCounter.Count + 0.01f));
|
||||
}
|
||||
|
||||
public virtual void OnMiss(HitObject h)
|
||||
{
|
||||
ComboCounter.Current.Value = 0;
|
||||
AccuracyCounter?.Set(AccuracyCounter.Count - 0.01f);
|
||||
}
|
||||
|
||||
protected HudOverlay()
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
@ -76,8 +62,8 @@ namespace osu.Game.Modes.UI
|
||||
{
|
||||
//bind processor bindables to combocounter, score display etc.
|
||||
//TODO: these should be bindable binds, not events!
|
||||
processor.TotalScore.ValueChanged += delegate { ScoreCounter?.Set((ulong)processor.TotalScore.Value); };
|
||||
processor.Accuracy.ValueChanged += delegate { AccuracyCounter?.Set((float)processor.Accuracy.Value); };
|
||||
ScoreCounter?.Current.BindTo(processor.TotalScore);
|
||||
AccuracyCounter?.Current.BindTo(processor.Accuracy);
|
||||
ComboCounter?.Current.BindTo(processor.Combo);
|
||||
HealthDisplay?.Current.BindTo(processor.Health);
|
||||
}
|
||||
|
Reference in New Issue
Block a user