A game scene

Constructors

Properties

animationSystem: AnimationSystem
hierarchySystem: HierarchySystem
inputSystem: InputSystem
physicsSystem: PhysicsSystem
renderSystem: RenderSystem
soundSystem: SoundSystem
uuid: string = ...

Accessors

Methods

  • Disposes the scene, unregistering all entities components from the corrispective systems and clearing the entities array

    Returns void

  • Sets the scene to draw, registering all entities components into the corrispective systems

    Returns void

  • Sets the scene to not draw, unregistering all entities components from the corrispective systems

    Returns void

  • Loads the scene from a given file path

    Parameters

    • filePath: string

      path of the scene file to load

    Returns Promise<void>

  • Loads the scene from a given json object

    Parameters

    Returns void

  • Adds entity to the scene and registers the entity's components into the corrispective systems if the scene is set to draw, else it will defer registering the components when draw is set to true

    Parameters

    • entity: IEntity

      The entity to register

    Returns void

  • Removes entity from the scene. Also removes the entity's components from the corrispective systems

    Parameters

    • uuid: string

      The uuid of the entity to unregister

    Returns void