Interface LifecycleProps

interface LifecycleProps {
    destroy$: Subject<void>;
    gameObject?: GameObject;
    label: string;
    scene?: SceneBase<Body> | Scene<Body>;
    update$: Subject<number>;
    destroy(): void;
    update(deltaTime): 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?: GameObject

Parent GameObject is assigned at creation. BaseScene & Scene don't have parent gameObject

label: string

Each Lifecycle Object has label for pixi debugging.

scene?: SceneBase<Body> | Scene<Body>

Lifecycle Object may be added to a Scene Object.

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 Object with actual deltaTime ~60fps

    Parameters

    • deltaTime: number

    Returns void