Interface ICompositeEntity<T>

Interface for a CompositeEntity, which is a reusable component within a CompositeEntity.

T - The type of the properties object for the CompositeEntity.

interface ICompositeEntity<T> {
    durationInMs?: number;
    key: string;
    props: T;
    startTimeinMs?: number;
    update(timeStamp: number, ctx: CanvasRenderingContext2D, entity: any): void;
}

Type Parameters

  • T

Properties

durationInMs?: number
key: string
props: T
startTimeinMs?: number

Methods

  • Parameters

    • timeStamp: number
    • ctx: CanvasRenderingContext2D
    • entity: any

    Returns void