esc_autoload.gd

Extends: Node

Description

This is Escoria’s singleton script. It holds accessors to some utils, such as Escoria’s logger.

Enumerations

GAME_STATE

const GAME_STATE: Dictionary = {"DEFAULT":0,"DIALOG":1,"WAIT":2}

Current game state

  • DEFAULT: Common game function

  • DIALOG: Game is playing a dialog

  • WAIT: Game is waiting

Constants Descriptions

BUS_MASTER

const BUS_MASTER: String = "Master"

Audio bus indices.

BUS_MUSIC

const BUS_MUSIC: String = "Music"

BUS_SFX

const BUS_SFX: String = "SFX"

BUS_SPEECH

const BUS_SPEECH: String = "Speech"

CAMERA_SCENE_PATH

const CAMERA_SCENE_PATH: String = "res://addons/escoria-core/game/scenes/camera_player/camera.tscn"

Path to camera scene

Logger

const Logger: GDScript = preload("res://addons/escoria-core/game/esc_logger.gd")

Logger class

Property Descriptions

logger

var logger

Logger instance

esc_compiler

var esc_compiler

ESC Compiler

object_manager

var object_manager

ESC Object Manager

room_manager

var room_manager

ESC Room Manager

room_terrain

var room_terrain

Terrain of the current room

inventory_manager

var inventory_manager: ESCInventoryManager

The inventory manager instance

action_manager

var action_manager: ESCActionManager

The action manager instance

event_manager

var event_manager: ESCEventManager

ESC Event manager instance

globals_manager

var globals_manager: ESCGlobalsManager

ESC globals registry instance

command_registry

var command_registry: ESCCommandRegistry

ESC command registry instance

settings_manager

var settings_manager: ESCSettingsManager

Manager of game settings (resolution, sound, etc)

resource_cache

var resource_cache: ESCResourceCache

Resource cache handler

dialog_player

var dialog_player: ESCDialogPlayer

Dialog player instantiator. This instance is called directly for dialogs.

inventory

var inventory

Inventory scene

main

var main

The main scene

inputs_manager

var inputs_manager: ESCInputsManager

The escoria inputs manager

save_manager

var save_manager: ESCSaveManager

Savegames and settings manager

game_scene

var game_scene: ESCGame

The game scene loaded

player_camera

var player_camera: ESCCamera

The main player camera

start_script

var start_script: ESCScript

The compiled start script loaded from ProjectSettings escoria/main/game_start_script

action_default_script

var action_default_script: ESCScript

The “fallback” script to use when an action is tried on an item that hasn’t been explicitly scripted.

is_direct_room_run

var is_direct_room_run: bool = false

Whether we ran a room directly from editor, not a full game

is_quitting

var is_quitting: bool = false

Whether we’re quitting the game

game_size

var game_size

The game resolution

current_state

var current_state

The current state of the game

Method Descriptions

get_escoria

func get_escoria()

Get the Escoria node. That node gives access to the Escoria scene that’s instanced by the main_scene (if full game is run) or by this autoload if room is run directly.

set_game_paused

func set_game_paused(p_paused: bool)

Pauses or unpause the game

Parameters

  • p_paused: if true, pauses the game. If false, unpauses the game.

new_game

func new_game()

Called from main menu’s “new game” button

quit

func quit()

Called from main menu’s “quit” button

Signals

  • signal paused():  Signal sent when Escoria is paused

  • signal resumed(): Signal sent when Escoria is resumed from pause