Adds "name" parameter to ESC spawn command (#410)
Co-authored-by: StraToN <StraToN@users.noreply.github.com>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
## Description
|
||||
|
||||
`spawn path [object2]`
|
||||
`spawn identifier path [is_active=true] [object2] `
|
||||
|
||||
Instances a scene determined by "path", and places in the position of
|
||||
object2 (object2 is optional)
|
||||
|
||||
@@ -113,14 +113,6 @@ var resource_cache: ESCResourceCache
|
||||
|
||||
Resource cache handler
|
||||
|
||||
### main\_menu\_instance
|
||||
|
||||
```gdscript
|
||||
var main_menu_instance
|
||||
```
|
||||
|
||||
Instance of the main menu
|
||||
|
||||
### room\_terrain
|
||||
|
||||
```gdscript
|
||||
@@ -210,8 +202,27 @@ var game_scene: ESCGame
|
||||
|
||||
The game scene loaded
|
||||
|
||||
### start\_script
|
||||
|
||||
```gdscript
|
||||
var start_script: ESCScript
|
||||
```
|
||||
|
||||
The compiled start script loaded from ProjectSettings
|
||||
escoria/main/game_start_script
|
||||
|
||||
## Method Descriptions
|
||||
|
||||
### init
|
||||
|
||||
```gdscript
|
||||
func init()
|
||||
```
|
||||
|
||||
Called by Escoria's main_scene as very very first event EVER.
|
||||
Usually you'll want to show some logos animations before spawning the main
|
||||
menu in the escoria/main/game_start_script 's :init event
|
||||
|
||||
### new\_game
|
||||
|
||||
```gdscript
|
||||
@@ -246,6 +257,19 @@ Pauses or unpause the game
|
||||
#### Parameters
|
||||
- p_paused: if true, pauses the game. If false, unpauses the game.
|
||||
|
||||
### run\_event\_from\_script
|
||||
|
||||
```gdscript
|
||||
func run_event_from_script(script: ESCScript, event_name: String)
|
||||
```
|
||||
|
||||
Runs the event "event_name" from the "script" ESC script.
|
||||
|
||||
#### Parameters
|
||||
- script: ESC script containing the event to run. The script must have been
|
||||
loaded.
|
||||
- event_name: Name of the event to run
|
||||
|
||||
## Signals
|
||||
|
||||
- signal request_pause_menu(): Signal sent when pause menu has to be displayed
|
||||
|
||||
@@ -338,7 +338,7 @@ Moves object1 towards the position of object2, at the speed determined by
|
||||
object1's "speed" property, unless overridden. This command is non-blocking.
|
||||
It does not respect the room's navigation polygons, so you can move items
|
||||
where the player can't walk.
|
||||
#### <a name="SpawnCommand.md"></a>`spawn path [object2]` [API-Doc](api/SpawnCommand.md)
|
||||
#### <a name="SpawnCommand.md"></a>`spawn identifier path [is_active=true] [object2] ` [API-Doc](api/SpawnCommand.md)
|
||||
|
||||
Instances a scene determined by "path", and places in the position of
|
||||
object2 (object2 is optional)
|
||||
|
||||
Reference in New Issue
Block a user