1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-05 03:13:22 +08:00
1 Hitobject drawables
Salman Ahmed edited this page 2021-06-23 05:03:09 +03:00

Each hit object type from the beatmap has a pooled/non-pooled drawable representation for it, based on the abstract class DrawableHitObject.

Display management

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:

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)