From bf44c09a9142d567878a27e2a30fc1b311201023 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 12 May 2021 12:59:46 +0900 Subject: [PATCH] Add name identifying container and rename index variable --- osu.Game.Rulesets.Mania/UI/Column.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Mania/UI/Column.cs b/osu.Game.Rulesets.Mania/UI/Column.cs index 88c3bd5dbf..827d8e2a0a 100644 --- a/osu.Game.Rulesets.Mania/UI/Column.cs +++ b/osu.Game.Rulesets.Mania/UI/Column.cs @@ -73,6 +73,7 @@ namespace osu.Game.Rulesets.Mania.UI background, new Container { + Name = "Column samples pool", RelativeSizeAxes = Axes.Both, ChildrenEnumerable = hitSounds = Enumerable.Range(0, max_concurrent_hitsounds).Select(_ => new SkinnableSound()).ToArray() }, @@ -132,7 +133,7 @@ namespace osu.Game.Rulesets.Mania.UI HitObjectArea.Explosions.Add(hitExplosionPool.Get(e => e.Apply(result))); } - private int nextHitSound; + private int nextHitSoundIndex; public bool OnPressed(ManiaAction action) { @@ -147,12 +148,12 @@ namespace osu.Game.Rulesets.Mania.UI if (nextObject is DrawableManiaHitObject maniaObject) { - var hitSound = hitSounds[nextHitSound]; + var hitSound = hitSounds[nextHitSoundIndex]; hitSound.Samples = maniaObject.GetGameplaySamples(); hitSound.Play(); - nextHitSound = (nextHitSound + 1) % max_concurrent_hitsounds; + nextHitSoundIndex = (nextHitSoundIndex + 1) % max_concurrent_hitsounds; } return true;