dacha
    Preparing search index...

    Interface Scene

    A level, a menu or another state of the game. A scene holds actors.

    The engine creates scenes from the configuration. To find actors in a scene, use ActorQuery.

    Hierarchy (View Summary)

    Index
    actorSpawner: ActorSpawner

    Spawner utility for creating new actors within this scene

    children: Actor[]

    Collection of actors contained within this scene

    data: Record<string, unknown>

    Custom data storage for scene-related information

    id: string

    Id of the entity

    name: string

    Name of the entity

    parent: null

    Parent of the entity

    templateCollection: TemplateCollection

    Template collection used for creating actors from predefined templates

    • Adds a child to the entity.

      Parameters

      • child: Actor

        Child to add

      Returns void

    • Finds a child entity by a predicate function.

      Parameters

      • predicate: (child: Actor) => boolean

        A function that runs on each child entity and should return true if the child entity matches the predicate or false otherwise

      • recursive: boolean = true

        Whether to search recursively through the children

      Returns Actor | undefined

      Child entity or undefined

    • Finds a child entity by its id.

      Parameters

      • id: string

        Id of the child entity

      • recursive: boolean = true

        Whether to search recursively through the children

      Returns Actor | undefined

      Child entity or undefined

    • Finds a child entity by its name.

      Parameters

      • name: string

        Name of the child entity

      • recursive: boolean = true

        Whether to search recursively through the children

      Returns Actor | undefined

      Child entity or undefined

    • Removes the entity from its parent.

      Returns void

    • Advanced

      Removes all event listeners from the event target.

      Returns void

    • Removes a child from the entity.

      Parameters

      • child: Actor

        Child to remove

      Returns void