dacha
    Preparing search index...

    Class SceneSystemAbstract

    Abstract base class for scene-level systems.

    Scene systems operate within a specific scene and are created/destroyed with the scene. They're typically used for game logic, AI, and scene-specific features.

    Hierarchy (View Summary)

    Index
    • Creates the system.

      Parameters

      • Optionaloptions: object

        The system's options. Fields marked with DefineField take their values from options, or its decorated fields keep their initial values.

      Returns SceneSystem

    systemName: string

    The name the configuration uses for the system.

    DefineSystem sets it, so a game usually does not assign it.

    • Called with fixed timestep for physics calculations

      Returns void

    • Called when a scene becomes active

      Parameters

      Returns void

    • Called when a scene becomes inactive, but still remains in memory

      Parameters

      Returns void

    • Called when a scene is loaded. Used to load required resources for the system such as images, fonts, etc.

      Parameters

      Returns Promise<void>

    • Called every frame with variable timestep

      Returns void

    • Lists the system in EngineOptions.systems together with its dependencies: classes and functions from the game code that cannot live in the configuration. The system receives them as the second argument of its constructor.

      Type Parameters

      Parameters

      Returns SystemBinding<T>

      A binding to put into EngineOptions.systems.

      const engine = new Engine({
      config,
      systems: [
      Renderer.with({ shaders: [WaveShader] }),
      BehaviorSystem.with({ behaviors: [PlayerScript] }),
      CameraSystem,
      ],
      components: [...],
      assets: [...],
      });