dino-ge
    Preparing search index...

    Class Sprite

    A high-level object that represents an animated sprite. Wraps SpriteComponent and TransformComponent for ease of use.

    Hierarchy (View Summary)

    Index
    actions: ActionQueue = ...

    Actions advanced for this object as active game time elapses.

    id: string = ...

    Unique identifier for the game object.

    registered: boolean = false

    Whether the sprite is currently registered with the engine.

    _registry: typeof Registry = Registry

    Static helper for tests to bypass Registry circularity if mocked.

    • Emits a custom event on this object's event bus.

      Parameters

      • type: string

        The event type.

      • Optionaldetail: unknown

        Optional data to pass with the event.

      Returns void

    • Stops listening for an event on this object's event bus.

      Parameters

      • type: string

        The event type.

      • callback: (event: CustomEvent) => void

        The function to remove.

      Returns void

    • Listens for an event on this object's event bus.

      Parameters

      • type: string

        The event type.

      • callback: (event: CustomEvent) => void

        The function to run when the event occurs.

      Returns void

    • Starts a named clip on game time and registers the sprite if needed. Repeating the same request keeps its progress, resumes a paused clip, or holds a completed pose. Changing clips or modes, or setting restart, starts from the first frame.

      Parameters

      Returns void