Move Kiai bool to HitObject.

This commit is contained in:
smoogipooo 2017-09-12 10:01:07 +09:00
parent 3c98bc065f
commit d6bf5c38b7
2 changed files with 9 additions and 15 deletions

View File

@ -29,19 +29,5 @@ namespace osu.Game.Rulesets.Taiko.Objects
/// Strong hit objects give more points for hitting the hit object with both keys.
/// </summary>
public bool IsStrong;
/// <summary>
/// Whether this HitObject is in Kiai time.
/// </summary>
public bool Kiai { get; protected set; }
public override void ApplyDefaults(ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty)
{
base.ApplyDefaults(controlPointInfo, difficulty);
EffectControlPoint effectPoint = controlPointInfo.EffectPointAt(StartTime);
Kiai |= effectPoint.KiaiMode;
}
}
}
}

View File

@ -30,6 +30,11 @@ namespace osu.Game.Rulesets.Objects
/// </summary>
public SampleInfoList Samples = new SampleInfoList();
/// <summary>
/// Whether this <see cref="HitObject"/> is in Kiai time.
/// </summary>
public bool Kiai { get; private set; }
/// <summary>
/// Applies default values to this HitObject.
/// </summary>
@ -38,6 +43,9 @@ namespace osu.Game.Rulesets.Objects
public virtual void ApplyDefaults(ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty)
{
SoundControlPoint soundPoint = controlPointInfo.SoundPointAt(StartTime);
EffectControlPoint effectPoint = controlPointInfo.EffectPointAt(StartTime);
Kiai |= effectPoint.KiaiMode;
// Initialize first sample
Samples.ForEach(s => initializeSampleInfo(s, soundPoint));