-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Hitobject drawables
Each hit object type from the beatmap has a pooled/non-pooled drawable representation for it, based on the abstract class DrawableHitObject.
The display of DrawableHitObject is managed by Drawable lifetime logic and transforms.
Each DrawableHitObject is assigned a LifetimeStart/LifetimeEnd where they become "alive" on the scene, and a central state update method is called to set up the transforms for the object, based on the current "armed" state.
During the transforms setup process, previous transforms to the object or its content would be removed and multiple transform update methods will get called, each at a different TransformStartTime (see BeginAbsoluteSequence).
The transform update methods are as follows:
-
UpdateInitialTransforms, invoked at the timeHitObject.StartTime - InitialLifetimeOffset, which is considered the time at which the object may begin displaying its content at (example case being fading the hitcircle in). -
UpdateStartTimeStateTransforms, invoked at the timeStateUpdateTime, which delegates to the start time of the hitobject. (example case being hiding the hitcircle approach circle) -
UpdateHitStateTransforms, invoked at the timeHitStateUpdateTime, which is the time at which the object was judged at. (example case being fading out the spinner)
There's also the ApplyCustomUpdateState event which is invoked after the transform update methods have been called and the LifetimeEnd calculation has taken place. It's defined for mods that adjust the visibility of the objects, and also for Drawable components inside the object hierarchy to be able to properly transform their content using the DrawableHitObject transforms system. (example cases being hitcircle main piece and spinner body)