Class GameLoop

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

Implements

Constructors

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

framerateTimer: Timer = ...
framesRendered: number = 0
gameLoopTimer: Timer = ...

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