mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Fix first hitobject in osu! hidden mod not getting correct fade applied
This commit is contained in:
@ -38,7 +38,13 @@ namespace osu.Game.Rulesets.Mods
|
||||
public virtual void ApplyToDrawableHitObjects(IEnumerable<DrawableHitObject> drawables)
|
||||
{
|
||||
if (IncreaseFirstObjectVisibility.Value)
|
||||
{
|
||||
var firstObject = drawables.FirstOrDefault();
|
||||
if (firstObject != null)
|
||||
firstObject.ApplyCustomUpdateState += ApplyFirstObjectIncreaseVisibilityState;
|
||||
|
||||
drawables = drawables.SkipWhile(h => !IsFirstHideableObject(h)).Skip(1);
|
||||
}
|
||||
|
||||
foreach (var dho in drawables)
|
||||
dho.ApplyCustomUpdateState += ApplyHiddenState;
|
||||
@ -65,6 +71,20 @@ namespace osu.Game.Rulesets.Mods
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Apply a special visibility state to the first object in a beatmap, if the user chooses to turn on the "increase first object visibility" setting.
|
||||
/// </summary>
|
||||
/// <param name="hitObject">The hit object to apply the state change to.</param>
|
||||
/// <param name="state">The state of the hit object.</param>
|
||||
protected virtual void ApplyFirstObjectIncreaseVisibilityState(DrawableHitObject hitObject, ArmedState state)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Apply a hidden state to the provided object.
|
||||
/// </summary>
|
||||
/// <param name="hitObject">The hit object to apply the state change to.</param>
|
||||
/// <param name="state">The state of the hit object.</param>
|
||||
protected virtual void ApplyHiddenState(DrawableHitObject hitObject, ArmedState state)
|
||||
{
|
||||
}
|
||||
|
Reference in New Issue
Block a user