mirror of
https://github.com/ppy/osu.git
synced 2025-02-16 00:22:58 +08:00
Add method to safely refresh DrawableHitObject transforms
This commit is contained in:
parent
bec16436b0
commit
08a232f7fa
@ -14,13 +14,13 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using osu.Framework.Threading;
|
||||
using osu.Game.Audio;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Rulesets.Judgements;
|
||||
using osu.Game.Rulesets.Objects.Pooling;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Skinning;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Rulesets.Objects.Pooling;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using osu.Game.Skinning;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Rulesets.Objects.Drawables
|
||||
@ -429,6 +429,13 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
base.ClearTransformsAfter(double.MinValue, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes all previously applied transforms, then reapplies a new set of transforms with potentially different parameters.
|
||||
/// The transforms will use the current <see cref="ArmedState"/>, and they will use the appropriate start times.
|
||||
/// This also takes in account potential overrides defined in <see cref="ApplyCustomUpdateState"/>.
|
||||
/// </summary>
|
||||
protected void RefreshStateTransforms() => updateState(State.Value, true);
|
||||
|
||||
/// <summary>
|
||||
/// Apply (generally fade-in) transforms leading into the <see cref="HitObject"/> start time.
|
||||
/// The local drawable hierarchy is recursively delayed to <see cref="HitObjectLifetimeEntry.LifetimeStart"/> for convenience.
|
||||
|
Loading…
Reference in New Issue
Block a user