Interface LifecycleProps

interface LifecycleProps {
    destroy$: Subject<void>;
    gameObject?: LifecycleParent;
    label: string;
    update$: Subject<number>;
    destroy(): void;
    update(deltaTime: number): void;
}

Implemented by

Properties

destroy$: Subject<void>

When Lifecycle Object is destroyed, it emits and closes this subject. Along with destroying his children, which in turn behave the same.

gameObject?: LifecycleParent

Parent GameObject is assigned at creation. BaseScene/Scene has no gameObject

label: string

Each Lifecycle Object has label for pixi debugging.

update$: Subject<number>

When Lifecycle Object is updated, it emits this subject. Along with updating his children, which in turn behave the same.

Methods

  • Called to destroy can cleanup Lifecycle Object.

    Returns void

  • Updates the Lifecycle with actual deltaTime = 1.0 for 60FPS

    Parameters

    • deltaTime: number

    Returns void