Interface IGameLoop

An object which supports the execution of a collection of events repeatedly at a desired 'framerate' (times per second)

interface IGameLoop {
    Framerate: Observable<number>;
    GameEvents: Observable<any>[];
    Start(framerate): void;
    Stop(): void;
}

Implemented by

Properties

Methods

Properties

Framerate: Observable<number>

Observable which pushes the achieved framerate to subscribers

GameEvents: Observable<any>[]

The collection of events to be triggered at the given framerate

Methods

  • Initiates the triggering of events at the given framerate

    Parameters

    • framerate: number

      times per second events should be triggered

    Returns void

Generated using TypeDoc