Class GameEngine

Main game engine class. Contains all the systems and components to run the game engine with minimum setup

Constructors

Properties

animationSystem: AnimationSystem
hierarchySystem: HierarchySystem
imageLoader: ImageLoader
inputSystem: InputSystem
physicsSystem: PhysicsSystem
renderer: Renderer
renderSystem: RenderSystem
soundSystem: SoundSystem

Accessors

Methods

  • This factory method creates a new Scene ensuring all the systems are linked to it The scene is automatically set to be drawn if it is the first scene created All the other scenes are instead kept hidden

    Parameters

    • shouldDraw: boolean = false

      Should the scene be drawn or hidden. Defaults to false

    Returns Scene

    newly created scene

  • Removes a scene from the engine. Also hides the scene if it is currently drawn

    Parameters

    • sceneId: string

      The id of the scene to remove

    Returns void