From 558c53a6baa0931e223a47c6f18433602d939e5e Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Fri, 2 Feb 2018 18:47:10 +0900 Subject: [PATCH] Give HitObject some HitWindows --- osu.Game/Rulesets/Objects/HitObject.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/osu.Game/Rulesets/Objects/HitObject.cs b/osu.Game/Rulesets/Objects/HitObject.cs index 160d639e8e..ae9ed2b357 100644 --- a/osu.Game/Rulesets/Objects/HitObject.cs +++ b/osu.Game/Rulesets/Objects/HitObject.cs @@ -49,6 +49,15 @@ namespace osu.Game.Rulesets.Objects [JsonIgnore] public bool Kiai { get; private set; } + private float overallDifficulty = BeatmapDifficulty.DEFAULT_DIFFICULTY; + + private HitWindows hitWindows; + + /// + /// The keypress hit windows for this . + /// + public HitWindows HitWindows => hitWindows ?? (hitWindows = new HitWindows(overallDifficulty)); + private readonly SortedList nestedHitObjects = new SortedList((h1, h2) => h1.StartTime.CompareTo(h2.StartTime)); [JsonIgnore] @@ -75,6 +84,9 @@ namespace osu.Game.Rulesets.Objects Kiai = effectPoint.KiaiMode; SampleControlPoint = samplePoint; + + overallDifficulty = difficulty.OverallDifficulty; + hitWindows = null; } protected virtual void CreateNestedHitObjects()