ESCRoomManager

Extends: Resource

Description

Constants Descriptions

GLOBAL_ANIMATION_RESOURCES

const GLOBAL_ANIMATION_RESOURCES: String = "ANIMATION_RESOURCES"

GLOBAL_CURRENT_SCENE

const GLOBAL_CURRENT_SCENE: String = "ESC_CURRENT_SCENE"

Contains the global_id of the current room

GLOBAL_FORCE_LAST_SCENE_NULL

const GLOBAL_FORCE_LAST_SCENE_NULL: String = "FORCE_LAST_SCENE_NULL"

If true, ESC_LAST_SCENE is not considered for automatic transitions

GLOBAL_LAST_SCENE

const GLOBAL_LAST_SCENE: String = "ESC_LAST_SCENE"

Reserved globals which can not be overridden; prefixed with “GLOBAL_”

Contains the global_id of previous room

RESERVED_GLOBALS

const RESERVED_GLOBALS: Dictionary = {"ANIMATION_RESOURCES":{},"ESC_CURRENT_SCENE":"","ESC_LAST_SCENE":"","FORCE_LAST_SCENE_NULL":false}

Dict of the reserved globals to register and their initial values.

Method Descriptions

register_reserved_globals

func register_reserved_globals() -> void

Registers all reserved global flags for use.

change_scene

func change_scene(room_path: String, enable_automatic_transitions: bool) -> void

Performs the actions needed in order to change the current scene to the one specified by room_path.

Parameters

  • room_path: Node path to the room that is to become the new current room.

  • enable_automatic_transitions: Whether to play the transition between rooms automatically or to leave the responsibility to the developer.

init_room

func init_room(room: ESCRoom) -> void

Sanitize camera limits, add player node and set the global id to the name of this node if it’s not set manually

Parameters

  • room: The ESCRoom to be initialized for use.