diff --git a/osu.Game.Modes.Taiko/Objects/DrumRoll.cs b/osu.Game.Modes.Taiko/Objects/DrumRoll.cs
index ba51878635..78e9202f20 100644
--- a/osu.Game.Modes.Taiko/Objects/DrumRoll.cs
+++ b/osu.Game.Modes.Taiko/Objects/DrumRoll.cs
@@ -25,41 +25,33 @@ namespace osu.Game.Modes.Taiko.Objects
///
/// Velocity of the drum roll in positional length units per millisecond.
///
- public double Velocity;
+ public double Velocity { get; protected set; }
///
/// The distance between ticks of this drumroll.
/// Half of this value is the hit window of the ticks.
///
- public double TickTimeDistance;
+ public double TickTimeDistance { get; protected set; }
///
/// Number of drum roll ticks required for a "Good" hit.
///
- public double RequiredGoodHits;
+ public double RequiredGoodHits { get; protected set; }
///
/// Number of drum roll ticks required for a "Great" hit.
///
- public double RequiredGreatHits;
+ public double RequiredGreatHits { get; protected set; }
///
/// Total number of drum roll ticks.
///
- public int TotalTicks;
+ public int TotalTicks => Ticks.Count();
///
/// Initializes the drum roll ticks if not initialized and returns them.
///
- public IEnumerable Ticks
- {
- get
- {
- if (ticks == null)
- createTicks();
- return ticks;
- }
- }
+ public IEnumerable Ticks => ticks ?? (ticks = createTicks());
private List ticks;
@@ -75,22 +67,21 @@ namespace osu.Game.Modes.Taiko.Objects
else
TickTimeDistance /= 4;
- TotalTicks = Ticks.Count();
RequiredGoodHits = TotalTicks * Math.Min(0.15, 0.05 + 0.10 / 6 * difficulty.OverallDifficulty);
RequiredGreatHits = TotalTicks * Math.Min(0.30, 0.10 + 0.20 / 6 * difficulty.OverallDifficulty);
}
- private void createTicks()
+ private List createTicks()
{
- ticks = new List();
+ var ret = new List();
if (TickTimeDistance == 0)
- return;
+ return ret;
bool first = true;
for (double t = StartTime; t < EndTime + (int)TickTimeDistance; t += TickTimeDistance)
{
- ticks.Add(new DrumRollTick
+ ret.Add(new DrumRollTick
{
FirstTick = first,
PreEmpt = PreEmpt,
@@ -105,6 +96,8 @@ namespace osu.Game.Modes.Taiko.Objects
first = false;
}
+
+ return ret;
}
}
}
\ No newline at end of file