escoria
Extends: Node
Description
This is Escoria’s singleton script. It holds accessors to some utils, such as Escoria’s logger.
Constants
DEFAULT
const DEFAULT = 0 # enum "GameState"
DIALOG
const DIALOG = 1 # enum "GameState"
WAIT
const WAIT = 2 # enum "GameState"
LOADING
const LOADING = 3 # enum "GameState"
PAUSED
const PAUSED = 4 # enum "GameState"
BUS_MASTER
const BUS_MASTER = "Master"
Master audio bus
BUS_SFX
const BUS_SFX = "SFX"
SFX audio bus
BUS_MUSIC
const BUS_MUSIC = "Music"
Music audio bus
BUS_SPEECH
const BUS_SPEECH = "Speech"
Speech audio bus
BUS_AMBIENT
const BUS_AMBIENT = "Ambient"
Ambient sound audio bus
CAMERA_SCENE_PATH
const CAMERA_SCENE_PATH = "res://addons/escoria-core/game/scenes/camera_player/camera.tscn"
EscLogger
const EscLogger = <Object>
GROUP_ITEM_CAN_COLLIDE
const GROUP_ITEM_CAN_COLLIDE = "item_can_collide"
Group for ESCItem’s that can be collided with in a scene. Used for quick retrieval of such nodes to easily change their attributes at the same time.
GROUP_ITEM_TRIGGERS
const GROUP_ITEM_TRIGGERS = "item_triggers"
Group for ESCItem’s that are triggers
Members
logger
var logger: "addons/escoria-core/tools/logging/esc_logger.gd".ESCLoggerFile
esc_compiler
var esc_compiler: ESCCompiler
ESC Compiler instance
object_manager
var object_manager: ESCObjectManager
ESC Object Manager instance
room_manager
var room_manager: ESCRoomManager
ESC Room Manager instance
di
var di: ESCDependencyInjector
ESC Dependency Injector
inventory_manager
var inventory_manager: ESCInventoryManager
Inventory manager instance
action_manager
var action_manager: ESCActionManager
Action manager instance
event_manager
var event_manager: ESCEventManager
Event manager instance
globals_manager
var globals_manager: ESCGlobalsManager
Globals registry instance
command_registry
var command_registry: ESCCommandRegistry
ASHES 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.
interpreter_factory
var interpreter_factory: ESCInterpreterFactory
ESCScript interpreter factory instance
inputs_manager
var inputs_manager: ESCInputsManager
Inputs manager instance
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
Whether we ran a room directly from editor, not a full game
is_quitting
var is_quitting: bool
Whether we’re quitting the game
room_terrain
var room_terrain: Variant
Terrain of the current room
inventory
var inventory: Variant
Inventory scene
main
var main: Variant
The main scene
creating_new_game
var creating_new_game: bool
Whether Escoria is creating a new game
game_size
var game_size: Variant
Game actual resolution obtained from viewport.
current_state
var current_state: Variant
Current state of Escoria (GameState enum)
Signals
new_game_started
signal new_game_started()
Signal sent when Escoria starts a new game
Parameters
None.
paused
signal paused()
Signal sent when Escoria is paused
Parameters
None.
resumed
signal resumed()
Signal sent when Escoria is resumed from pause
Parameters
None.
Methods
init_main_scene
func init_main_scene() -> void
Initializes the Escoria main scene as child of the Escoria autoloaded scene.
Parameters
None.
Returns
Returns nothing.
get_escoria
func get_escoria() -> Variant
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.
Parameters
None.
Returns
Returns nothing.
set_game_paused
func set_game_paused(p_paused: bool) -> void
Pauses or unpause the game
Parameters
Name |
Type |
Description |
Required? |
|---|---|---|---|
p_paused |
|
if true, pauses the game. If false, unpauses the game. |
yes |
Returns
Returns nothing.
new_game
func new_game() -> void
Called from main menu’s “new game” button.
Parameters
None.
Returns
Returns nothing.
quit
func quit() -> void
Called from main menu’s “quit” button.
Parameters
None.
Returns
Returns nothing.