diff --git a/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs b/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs index 500859d5cf..afa83b672b 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs @@ -38,7 +38,6 @@ namespace osu.Desktop.VisualTests.Tests Origin = Anchor.BottomLeft, Anchor = Anchor.BottomLeft, Margin = new MarginPadding(10), - Count = 0, TextSize = 40, }; Add(comboCounter); @@ -72,7 +71,7 @@ namespace osu.Desktop.VisualTests.Tests AddButton(@"Reset all", delegate { score.Current.Value = 0; - comboCounter.Count = 0; + comboCounter.Current.Value = 0; numerator = denominator = 0; accuracyCounter.SetFraction(0, 0); stars.Count = 0; @@ -82,14 +81,14 @@ namespace osu.Desktop.VisualTests.Tests AddButton(@"Hit! :D", delegate { score.Current.Value += 300 + (ulong)(300.0 * (comboCounter.Count > 0 ? comboCounter.Count - 1 : 0) / 25.0); - comboCounter.Count++; + comboCounter.Increment(); numerator++; denominator++; accuracyCounter.SetFraction(numerator, denominator); }); AddButton(@"miss...", delegate { - comboCounter.Roll(); + comboCounter.Current.Value = 0; denominator++; accuracyCounter.SetFraction(numerator, denominator); }); diff --git a/osu.Game.Modes.Catch/CatchRuleset.cs b/osu.Game.Modes.Catch/CatchRuleset.cs index cefcfe4299..e2753cb62d 100644 --- a/osu.Game.Modes.Catch/CatchRuleset.cs +++ b/osu.Game.Modes.Catch/CatchRuleset.cs @@ -82,13 +82,15 @@ namespace osu.Game.Modes.Catch public override FontAwesome Icon => FontAwesome.fa_osu_fruits_o; - - public override KeyCounter[] CreateGameplayKeys => new KeyCounter[] + public override IEnumerable CreateGameplayKeys() { - new KeyCounterKeyboard(Key.ShiftLeft), - new KeyCounterMouse(MouseButton.Left), - new KeyCounterMouse(MouseButton.Right) - }; + return new KeyCounter[] + { + new KeyCounterKeyboard(Key.ShiftLeft), + new KeyCounterMouse(MouseButton.Left), + new KeyCounterMouse(MouseButton.Right) + }; + } public override ScoreProcessor CreateScoreProcessor(int hitObjectCount = 0) => null; diff --git a/osu.Game.Modes.Mania/ManiaRuleset.cs b/osu.Game.Modes.Mania/ManiaRuleset.cs index 81307b2a53..8ca13d7512 100644 --- a/osu.Game.Modes.Mania/ManiaRuleset.cs +++ b/osu.Game.Modes.Mania/ManiaRuleset.cs @@ -102,7 +102,10 @@ namespace osu.Game.Modes.Mania public override FontAwesome Icon => FontAwesome.fa_osu_mania_o; - public override KeyCounter[] CreateGameplayKeys => new KeyCounter[] { /* Todo: Should be keymod specific */ }; + public override IEnumerable CreateGameplayKeys() + { + return new KeyCounter[] { /* Todo: Should be keymod specific */ }; + } public override ScoreProcessor CreateScoreProcessor(int hitObjectCount = 0) => null; diff --git a/osu.Game.Modes.Osu/OsuRuleset.cs b/osu.Game.Modes.Osu/OsuRuleset.cs index 5fd35df4d1..d7fdc972f0 100644 --- a/osu.Game.Modes.Osu/OsuRuleset.cs +++ b/osu.Game.Modes.Osu/OsuRuleset.cs @@ -113,12 +113,16 @@ namespace osu.Game.Modes.Osu protected override PlayMode PlayMode => PlayMode.Osu; public override string Description => "osu!"; - public override KeyCounter[] CreateGameplayKeys => new KeyCounter[] + + public override IEnumerable CreateGameplayKeys() { - new KeyCounterKeyboard(Key.Z), - new KeyCounterKeyboard(Key.X), - new KeyCounterMouse(MouseButton.Left), - new KeyCounterMouse(MouseButton.Right) - }; + return new KeyCounter[] + { + new KeyCounterKeyboard(Key.Z), + new KeyCounterKeyboard(Key.X), + new KeyCounterMouse(MouseButton.Left), + new KeyCounterMouse(MouseButton.Right) + }; + } } } diff --git a/osu.Game.Modes.Osu/OsuRuleset.cs.orig b/osu.Game.Modes.Osu/OsuRuleset.cs.orig new file mode 100644 index 0000000000..014b0cedab --- /dev/null +++ b/osu.Game.Modes.Osu/OsuRuleset.cs.orig @@ -0,0 +1,128 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using OpenTK.Input; +using osu.Game.Beatmaps; +using osu.Game.Graphics; +using osu.Game.Modes.Objects; +using osu.Game.Modes.Osu.Objects; +using osu.Game.Modes.Osu.UI; +using osu.Game.Modes.UI; +using osu.Game.Screens.Play; +using System.Collections.Generic; +using System.Linq; + +namespace osu.Game.Modes.Osu +{ + public class OsuRuleset : Ruleset + { + public override HitRenderer CreateHitRendererWith(Beatmap beatmap) => new OsuHitRenderer + { + Beatmap = beatmap, + }; + + public override IEnumerable GetBeatmapStatistics(WorkingBeatmap beatmap) => new[] + { + new BeatmapStatistic + { + Name = @"Circle count", + Content = beatmap.Beatmap.HitObjects.Count(h => h is HitCircle).ToString(), + Icon = FontAwesome.fa_dot_circle_o + }, + new BeatmapStatistic + { + Name = @"Slider count", + Content = beatmap.Beatmap.HitObjects.Count(h => h is Slider).ToString(), + Icon = FontAwesome.fa_circle_o + } + }; + + public override IEnumerable GetModsFor(ModType type) + { + switch (type) + { + case ModType.DifficultyReduction: + return new Mod[] + { + new OsuModEasy(), + new OsuModNoFail(), + new OsuModHalfTime(), + }; + + case ModType.DifficultyIncrease: + return new Mod[] + { + new OsuModHardRock(), + new MultiMod + { + Mods = new Mod[] + { + new OsuModSuddenDeath(), + new OsuModPerfect(), + }, + }, + new MultiMod + { + Mods = new Mod[] + { + new OsuModDoubleTime(), + new OsuModNightcore(), + }, + }, + new OsuModHidden(), + new OsuModFlashlight(), + }; + + case ModType.Special: + return new Mod[] + { + new OsuModRelax(), + new OsuModAutopilot(), + new OsuModSpunOut(), + new MultiMod + { + Mods = new Mod[] + { + new OsuModAutoplay(), + new ModCinema(), + }, + }, + new OsuModTarget(), + }; + + default: + return new Mod[] { }; + } + } + + public override FontAwesome Icon => FontAwesome.fa_osu_osu_o; + + public override HitObjectParser CreateHitObjectParser() => new OsuHitObjectParser(); + + public override ScoreProcessor CreateScoreProcessor(int hitObjectCount = 0) => new OsuScoreProcessor(hitObjectCount); + + public override DifficultyCalculator CreateDifficultyCalculator(Beatmap beatmap) => new OsuDifficultyCalculator(beatmap); + + public override Score CreateAutoplayScore(Beatmap beatmap) + { + var score = CreateScoreProcessor().GetScore(); + score.Replay = new OsuAutoReplay(beatmap); + return score; + } + + protected override PlayMode PlayMode => PlayMode.Osu; + + public override string Description => "osu!"; +<<<<<<< HEAD + public override KeyCounter[] CreateGameplayKeys => new KeyCounter[] +======= + public override KeyCounter[] GameplayKeys => new KeyCounter[] +>>>>>>> combocounter_bindable + { + new KeyCounterKeyboard(Key.Z), + new KeyCounterKeyboard(Key.X), + new KeyCounterMouse(MouseButton.Left), + new KeyCounterMouse(MouseButton.Right) + }; + } +} diff --git a/osu.Game.Modes.Taiko/Objects/DrumHit.cs b/osu.Game.Modes.Taiko/Objects/DrumHit.cs deleted file mode 100644 index f3fac33f76..0000000000 --- a/osu.Game.Modes.Taiko/Objects/DrumHit.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace osu.Game.Modes.Taiko.Objects -{ - class DrumHit - { - } -} diff --git a/osu.Game.Modes.Taiko/TaikoRuleset.cs b/osu.Game.Modes.Taiko/TaikoRuleset.cs index 3de7cf4b67..a2de092a07 100644 --- a/osu.Game.Modes.Taiko/TaikoRuleset.cs +++ b/osu.Game.Modes.Taiko/TaikoRuleset.cs @@ -82,13 +82,16 @@ namespace osu.Game.Modes.Taiko public override FontAwesome Icon => FontAwesome.fa_osu_taiko_o; - public override KeyCounter[] CreateGameplayKeys => new KeyCounter[] + public override IEnumerable CreateGameplayKeys() { - new KeyCounterKeyboard(Key.D), - new KeyCounterKeyboard(Key.F), - new KeyCounterKeyboard(Key.J), - new KeyCounterKeyboard(Key.K) - }; + return new KeyCounter[] + { + new KeyCounterKeyboard(Key.D), + new KeyCounterKeyboard(Key.F), + new KeyCounterKeyboard(Key.J), + new KeyCounterKeyboard(Key.K) + }; + } public override ScoreProcessor CreateScoreProcessor(int hitObjectCount = 0) => null; diff --git a/osu.Game/Modes/Ruleset.cs b/osu.Game/Modes/Ruleset.cs index 0e22361eb1..d8892e64e9 100644 --- a/osu.Game/Modes/Ruleset.cs +++ b/osu.Game/Modes/Ruleset.cs @@ -21,8 +21,6 @@ namespace osu.Game.Modes public abstract class Ruleset { - public abstract KeyCounter[] CreateGameplayKeys { get; } - private static ConcurrentDictionary availableRulesets = new ConcurrentDictionary(); public static IEnumerable PlayModes => availableRulesets.Keys; @@ -47,6 +45,8 @@ namespace osu.Game.Modes public abstract string Description { get; } + public abstract IEnumerable CreateGameplayKeys(); + public virtual Score CreateAutoplayScore(Beatmap beatmap) => null; public static Ruleset GetRuleset(PlayMode mode) diff --git a/osu.Game/Modes/Ruleset.cs.orig b/osu.Game/Modes/Ruleset.cs.orig new file mode 100644 index 0000000000..3b8d961029 --- /dev/null +++ b/osu.Game/Modes/Ruleset.cs.orig @@ -0,0 +1,69 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Beatmaps; +using osu.Game.Graphics; +using osu.Game.Modes.Objects; +using osu.Game.Modes.UI; +using osu.Game.Screens.Play; +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; + +namespace osu.Game.Modes +{ + public class BeatmapStatistic + { + public FontAwesome Icon; + public string Content; + public string Name; + } + + public abstract class Ruleset + { + public abstract KeyCounter[] CreateGameplayKeys { get; } + + private static ConcurrentDictionary availableRulesets = new ConcurrentDictionary(); +<<<<<<< HEAD + + public static IEnumerable PlayModes => availableRulesets.Keys; +======= + + public static IEnumerable PlayModes => availableRulesets.Keys; + +>>>>>>> combocounter_bindable + + public virtual IEnumerable GetBeatmapStatistics(WorkingBeatmap beatmap) => new BeatmapStatistic[] { }; + + public abstract IEnumerable GetModsFor(ModType type); + + public abstract ScoreProcessor CreateScoreProcessor(int hitObjectCount = 0); + + public abstract HitRenderer CreateHitRendererWith(Beatmap beatmap); + + public abstract HitObjectParser CreateHitObjectParser(); + + public abstract DifficultyCalculator CreateDifficultyCalculator(Beatmap beatmap); + + public static void Register(Ruleset ruleset) => availableRulesets.TryAdd(ruleset.PlayMode, ruleset.GetType()); + + protected abstract PlayMode PlayMode { get; } + + public virtual FontAwesome Icon => FontAwesome.fa_question_circle; + + public abstract string Description { get; } + + public virtual Score CreateAutoplayScore(Beatmap beatmap) => null; + + public static Ruleset GetRuleset(PlayMode mode) + { + Type type; + + if (!availableRulesets.TryGetValue(mode, out type)) + return null; + + return Activator.CreateInstance(type) as Ruleset; + } + + } +} diff --git a/osu.Game/Modes/Score.cs b/osu.Game/Modes/Score.cs index 1a761bea5d..8a06e8a60b 100644 --- a/osu.Game/Modes/Score.cs +++ b/osu.Game/Modes/Score.cs @@ -9,9 +9,9 @@ namespace osu.Game.Modes { public double TotalScore { get; set; } public double Accuracy { get; set; } - public double Combo { get; set; } - public double MaxCombo { get; set; } public double Health { get; set; } + public long Combo { get; set; } + public long MaxCombo { get; set; } public Replay Replay; public BeatmapInfo Beatmap; diff --git a/osu.Game/Modes/ScoreProcesssor.cs b/osu.Game/Modes/ScoreProcesssor.cs index 554996c145..ffae81fa82 100644 --- a/osu.Game/Modes/ScoreProcesssor.cs +++ b/osu.Game/Modes/ScoreProcesssor.cs @@ -25,7 +25,7 @@ namespace osu.Game.Modes public readonly BindableDouble Health = new BindableDouble { MinValue = 0, MaxValue = 1 }; - public readonly BindableInt Combo = new BindableInt(); + public readonly BindableLong Combo = new BindableLong(); /// /// Are we allowed to fail? @@ -43,7 +43,7 @@ namespace osu.Game.Modes /// Keeps track of the highest combo ever achieved in this play. /// This is handled automatically by ScoreProcessor. /// - public readonly BindableInt HighestCombo = new BindableInt(); + public readonly BindableLong HighestCombo = new BindableLong(); public readonly List Judgements; diff --git a/osu.Game/Modes/UI/ComboCounter.cs b/osu.Game/Modes/UI/ComboCounter.cs index b68489e37b..75d22ed0ad 100644 --- a/osu.Game/Modes/UI/ComboCounter.cs +++ b/osu.Game/Modes/UI/ComboCounter.cs @@ -1,6 +1,7 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using osu.Framework.Configuration; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Primitives; @@ -13,10 +14,12 @@ namespace osu.Game.Modes.UI { public abstract class ComboCounter : Container { - public bool IsRolling + public BindableLong Current = new BindableLong { - get; protected set; - } + MinValue = 0, + }; + + public bool IsRolling { get; protected set; } protected SpriteText PopOutCount; @@ -37,60 +40,9 @@ namespace osu.Game.Modes.UI /// protected EasingTypes RollingEasing => EasingTypes.None; - private ulong displayedCount; - - /// - /// Value shown at the current moment. - /// - public virtual ulong DisplayedCount - { - get - { - return displayedCount; - } - protected set - { - if (displayedCount.Equals(value)) - return; - updateDisplayedCount(displayedCount, value, IsRolling); - } - } - - private ulong count; - - /// - /// Actual value of counter. - /// - public virtual ulong Count - { - get - { - return count; - } - set - { - updateCount(value); - } - } - - public void Increment(ulong amount = 1) - { - Count = Count + amount; - } - protected SpriteText DisplayedCountSpriteText; - private float textSize; - public float TextSize - { - get { return textSize; } - set - { - textSize = value; - DisplayedCountSpriteText.TextSize = TextSize; - PopOutCount.TextSize = TextSize; - } - } + private long previousValue; /// /// Base of all combo counters. @@ -113,75 +65,97 @@ namespace osu.Game.Modes.UI }; TextSize = 80; + + Current.ValueChanged += comboChanged; + } + + private void comboChanged(object sender, System.EventArgs e) + { + updateCount(Current.Value == 0); } protected override void LoadComplete() { base.LoadComplete(); - DisplayedCountSpriteText.Text = FormatCount(Count); + DisplayedCountSpriteText.Text = FormatCount(Current); DisplayedCountSpriteText.Anchor = Anchor; DisplayedCountSpriteText.Origin = Origin; StopRolling(); } + private long displayedCount; + /// + /// Value shown at the current moment. + /// + public virtual long DisplayedCount + { + get { return displayedCount; } + protected set + { + if (displayedCount.Equals(value)) + return; + updateDisplayedCount(displayedCount, value, IsRolling); + } + } + + private float textSize; + public float TextSize + { + get { return textSize; } + set + { + textSize = value; + DisplayedCountSpriteText.TextSize = TextSize; + PopOutCount.TextSize = TextSize; + } + } + + /// + /// Increments the combo by an amount. + /// + /// + public void Increment(long amount = 1) + { + Current.Value = Current + amount; + } + /// /// Stops rollover animation, forcing the displayed count to be the actual count. /// public void StopRolling() { - updateCount(Count); + updateCount(false); } - /// - /// Animates roll-up/roll-back to an specific value. - /// - /// Target value. - public virtual void Roll(ulong newValue = 0) - { - updateCount(newValue, true); - } - - /// - /// Resets count to default value. - /// - public virtual void ResetCount() - { - updateCount(0); - } - - protected virtual string FormatCount(ulong count) + protected virtual string FormatCount(long count) { return count.ToString(); } - protected abstract void OnDisplayedCountRolling(ulong currentValue, ulong newValue); - protected abstract void OnDisplayedCountIncrement(ulong newValue); - protected abstract void OnDisplayedCountChange(ulong newValue); - - protected virtual void OnCountRolling(ulong currentValue, ulong newValue) + protected virtual void OnCountRolling(long currentValue, long newValue) { transformRoll(new TransformComboRoll(), currentValue, newValue); } - protected virtual void OnCountIncrement(ulong currentValue, ulong newValue) + protected virtual void OnCountIncrement(long currentValue, long newValue) { DisplayedCount = newValue; } - protected virtual void OnCountChange(ulong currentValue, ulong newValue) + protected virtual void OnCountChange(long currentValue, long newValue) { DisplayedCount = newValue; } - private double getProportionalDuration(ulong currentValue, ulong newValue) + private double getProportionalDuration(long currentValue, long newValue) { double difference = currentValue > newValue ? currentValue - newValue : newValue - currentValue; return difference * RollingDuration; } - private void updateDisplayedCount(ulong currentValue, ulong newValue, bool rolling) + private void updateDisplayedCount(long currentValue, long newValue, bool rolling) { displayedCount = newValue; if (rolling) @@ -192,10 +166,10 @@ namespace osu.Game.Modes.UI OnDisplayedCountChange(newValue); } - private void updateCount(ulong value, bool rolling = false) + private void updateCount(bool rolling) { - ulong prevCount = count; - count = value; + long prev = previousValue; + previousValue = Current; if (!IsLoaded) return; @@ -204,27 +178,27 @@ namespace osu.Game.Modes.UI { Flush(false, typeof(TransformComboRoll)); IsRolling = false; - DisplayedCount = prevCount; + DisplayedCount = prev; - if (prevCount + 1 == count) - OnCountIncrement(prevCount, count); + if (prev + 1 == Current) + OnCountIncrement(prev, Current); else - OnCountChange(prevCount, count); + OnCountChange(prev, Current); } else { - OnCountRolling(displayedCount, count); + OnCountRolling(displayedCount, Current); IsRolling = true; } } - private void transformRoll(TransformComboRoll transform, ulong currentValue, ulong newValue) + private void transformRoll(TransformComboRoll transform, long currentValue, long newValue) { Flush(false, typeof(TransformComboRoll)); if (RollingDuration < 1) { - DisplayedCount = Count; + DisplayedCount = Current; return; } @@ -237,9 +211,9 @@ namespace osu.Game.Modes.UI Transforms.Add(transform); } - protected class TransformComboRoll : Transform + protected class TransformComboRoll : Transform { - protected override ulong CurrentValue + protected override long CurrentValue { get { @@ -247,7 +221,7 @@ namespace osu.Game.Modes.UI if (time < StartTime) return StartValue; if (time >= EndTime) return EndValue; - return (ulong)Interpolation.ValueAt(time, StartValue, EndValue, StartTime, EndTime, Easing); + return (long)Interpolation.ValueAt(time, StartValue, EndValue, StartTime, EndTime, Easing); } } @@ -258,12 +232,8 @@ namespace osu.Game.Modes.UI } } - public void Set(ulong value) - { - if (value == 0) - Roll(); - else - Count = value; - } + protected abstract void OnDisplayedCountRolling(long currentValue, long newValue); + protected abstract void OnDisplayedCountIncrement(long newValue); + protected abstract void OnDisplayedCountChange(long newValue); } } diff --git a/osu.Game/Modes/UI/HUDOverlay.cs b/osu.Game/Modes/UI/HUDOverlay.cs index 1cf1e47bc5..06776f9163 100644 --- a/osu.Game/Modes/UI/HUDOverlay.cs +++ b/osu.Game/Modes/UI/HUDOverlay.cs @@ -13,7 +13,7 @@ using System.Collections.Generic; namespace osu.Game.Modes.UI { - internal abstract class HudOverlay : Container + public abstract class HudOverlay : Container { public readonly KeyCounterCollection KeyCounter; public readonly ComboCounter ComboCounter; @@ -35,7 +35,7 @@ namespace osu.Game.Modes.UI Children = new Drawable[] { - KeyCounter = CreateKeyCounter(ruleset.CreateGameplayKeys), + KeyCounter = CreateKeyCounter(ruleset.CreateGameplayKeys()), ComboCounter = CreateComboCounter(), ScoreCounter = CreateScoreCounter(), AccuracyCounter = CreateAccuracyCounter(), @@ -65,7 +65,7 @@ namespace osu.Game.Modes.UI //TODO: these should be bindable binds, not events! ScoreCounter?.Current.BindTo(processor.TotalScore); AccuracyCounter?.Current.BindTo(processor.Accuracy); - processor.Combo.ValueChanged += delegate { ComboCounter?.Set((ulong)processor.Combo.Value); }; + ComboCounter?.Current.BindTo(processor.Combo); HealthDisplay?.Current.BindTo(processor.Health); } diff --git a/osu.Game/Modes/UI/HealthDisplay.cs b/osu.Game/Modes/UI/HealthDisplay.cs index b920dcd68a..3471f4bc3f 100644 --- a/osu.Game/Modes/UI/HealthDisplay.cs +++ b/osu.Game/Modes/UI/HealthDisplay.cs @@ -6,7 +6,7 @@ using osu.Framework.Graphics.Containers; namespace osu.Game.Modes.UI { - internal abstract class HealthDisplay : Container + public abstract class HealthDisplay : Container { public readonly BindableDouble Current = new BindableDouble { @@ -16,9 +16,9 @@ namespace osu.Game.Modes.UI protected HealthDisplay() { - Current.ValueChanged += (s, e) => SetHP((float)Current); + Current.ValueChanged += (s, e) => SetHealth((float)Current); } - protected abstract void SetHP(float value); + protected abstract void SetHealth(float value); } } diff --git a/osu.Game/Modes/UI/StandardComboCounter.cs b/osu.Game/Modes/UI/StandardComboCounter.cs index 488ab40d42..86b689fa89 100644 --- a/osu.Game/Modes/UI/StandardComboCounter.cs +++ b/osu.Game/Modes/UI/StandardComboCounter.cs @@ -25,12 +25,12 @@ namespace osu.Game.Modes.UI PopOutCount.Anchor = Anchor; } - protected override string FormatCount(ulong count) + protected override string FormatCount(long count) { return $@"{count}x"; } - protected virtual void TransformPopOut(ulong newValue) + protected virtual void TransformPopOut(long newValue) { PopOutCount.Text = FormatCount(newValue); @@ -43,19 +43,19 @@ namespace osu.Game.Modes.UI PopOutCount.MoveTo(DisplayedCountSpriteText.Position, PopOutDuration, PopOutEasing); } - protected virtual void TransformPopOutRolling(ulong newValue) + protected virtual void TransformPopOutRolling(long newValue) { TransformPopOut(newValue); TransformPopOutSmall(newValue); } - protected virtual void TransformNoPopOut(ulong newValue) + protected virtual void TransformNoPopOut(long newValue) { DisplayedCountSpriteText.Text = FormatCount(newValue); DisplayedCountSpriteText.ScaleTo(1); } - protected virtual void TransformPopOutSmall(ulong newValue) + protected virtual void TransformPopOutSmall(long newValue) { DisplayedCountSpriteText.Text = FormatCount(newValue); DisplayedCountSpriteText.ScaleTo(PopOutSmallScale); @@ -71,7 +71,7 @@ namespace osu.Game.Modes.UI DisplayedCount++; } - protected override void OnCountRolling(ulong currentValue, ulong newValue) + protected override void OnCountRolling(long currentValue, long newValue) { ScheduledPopOutCurrentId++; @@ -82,7 +82,7 @@ namespace osu.Game.Modes.UI base.OnCountRolling(currentValue, newValue); } - protected override void OnCountIncrement(ulong currentValue, ulong newValue) + protected override void OnCountIncrement(long currentValue, long newValue) { ScheduledPopOutCurrentId++; @@ -100,7 +100,7 @@ namespace osu.Game.Modes.UI }, PopOutDuration); } - protected override void OnCountChange(ulong currentValue, ulong newValue) + protected override void OnCountChange(long currentValue, long newValue) { ScheduledPopOutCurrentId++; @@ -110,7 +110,7 @@ namespace osu.Game.Modes.UI base.OnCountChange(currentValue, newValue); } - protected override void OnDisplayedCountRolling(ulong currentValue, ulong newValue) + protected override void OnDisplayedCountRolling(long currentValue, long newValue) { if (newValue == 0) DisplayedCountSpriteText.FadeOut(FadeOutDuration); @@ -123,14 +123,14 @@ namespace osu.Game.Modes.UI TransformNoPopOut(newValue); } - protected override void OnDisplayedCountChange(ulong newValue) + protected override void OnDisplayedCountChange(long newValue) { DisplayedCountSpriteText.FadeTo(newValue == 0 ? 0 : 1); TransformNoPopOut(newValue); } - protected override void OnDisplayedCountIncrement(ulong newValue) + protected override void OnDisplayedCountIncrement(long newValue) { DisplayedCountSpriteText.Show(); diff --git a/osu.Game/Modes/UI/StandardHUDOverlay.cs b/osu.Game/Modes/UI/StandardHUDOverlay.cs index b67a1d72b1..03db6f0bda 100644 --- a/osu.Game/Modes/UI/StandardHUDOverlay.cs +++ b/osu.Game/Modes/UI/StandardHUDOverlay.cs @@ -1,7 +1,6 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - using OpenTK; using osu.Framework.Graphics; using osu.Framework.Graphics.Primitives; @@ -11,7 +10,7 @@ using System.Collections.Generic; namespace osu.Game.Modes.UI { - internal class StandardHudOverlay : HudOverlay + public class StandardHudOverlay : HudOverlay { public StandardHudOverlay(Ruleset ruleset) : base(ruleset) diff --git a/osu.Game/Modes/UI/StandardHealthDisplay.cs b/osu.Game/Modes/UI/StandardHealthDisplay.cs index 11b0bcd0c0..b6a3dc7f89 100644 --- a/osu.Game/Modes/UI/StandardHealthDisplay.cs +++ b/osu.Game/Modes/UI/StandardHealthDisplay.cs @@ -14,7 +14,7 @@ using osu.Game.Graphics; namespace osu.Game.Modes.UI { - internal class StandardHealthDisplay : HealthDisplay + public class StandardHealthDisplay : HealthDisplay { private Container fill; @@ -44,7 +44,7 @@ namespace osu.Game.Modes.UI } [BackgroundDependencyLoader] - private void laod(OsuColour colours) + private void load(OsuColour colours) { fill.Colour = colours.BlueLighter; fill.EdgeEffect = new EdgeEffect @@ -55,6 +55,6 @@ namespace osu.Game.Modes.UI }; } - protected override void SetHP(float value) => fill.ScaleTo(new Vector2(value, 1), 200, EasingTypes.OutQuint); + protected override void SetHealth(float value) => fill.ScaleTo(new Vector2(value, 1), 200, EasingTypes.OutQuint); } }