Event flags implementation (#382)

* Added event flags
* Added transition ESC command
* Also edited .gitignore to ignore .translation files
* docs: Automatic update of API docs

Co-authored-by: StraToN <StraToN@users.noreply.github.com>
This commit is contained in:
Julian Murgia
2021-09-07 09:13:09 +02:00
committed by GitHub
parent 903422960a
commit b4bf5b82d6
51 changed files with 1071 additions and 305 deletions

View File

@@ -6,11 +6,15 @@
## Description
`change_scene path run_events`
`change_scene path [disable_automatic_transition] [run_events]`
Loads a new scene, specified by "path". The `run_events` variable is a
boolean (default true) which you never want to set manually! It's there only
to benefit save games, so they don't conflict with the scene's events.
Loads a new scene, specified by "path".
 The `disable_automatic_transition` is a boolean (default false) can be set
to true to disable automatic transitions between scenes, to allow you
to control your transitions manually using the `transition` command.
The `run_events` variable is a boolean (default true) which you never want
to set manually! It's there only to benefit save games, so they don't
conflict with the scene's events.
@ESC

View File

@@ -17,18 +17,6 @@ Events are triggered from various sources. Common events include
## Constants Descriptions
### FLAG\_CUT\_BLACK
```gdscript
const FLAG_CUT_BLACK: int = 16
```
### FLAG\_LEAVE\_BLACK
```gdscript
const FLAG_LEAVE_BLACK: int = 32
```
### FLAG\_NO\_HUD
```gdscript
@@ -56,7 +44,7 @@ const FLAG_TK: int = 1
### REGEX
```gdscript
const REGEX: String = "^:(?<name>[^|]+)( \\|(?<flags>( (TK|NO_TT|NO_HUD|NO_SAVE|CUT_BLACK|LEAVE_BLACK))+))?$"
const REGEX: String = "^:(?<name>[^|]+)( \\|\\s*(?<flags>( (TK|NO_TT|NO_HUD|NO_SAVE))+))?$"
```
Regex identifying an ESC event

View File

@@ -22,6 +22,14 @@ Template for settings filename
## Property Descriptions
### save\_enabled
```gdscript
var save_enabled: bool = true
```
If true, saving a game is enabled. Else, saving is disabled
### save\_folder
```gdscript

View File

@@ -0,0 +1,39 @@
<!-- Auto-generated from JSON by GDScript docs maker. Do not edit this document directly. -->
# TransitionCommand
**Extends:** [ESCBaseCommand](../ESCBaseCommand) < [Node](../Node)
## Description
`transition transition_name in|out`
Performs a transition in our out manually.
@ESC
## Method Descriptions
### configure
```gdscript
func configure() -> ESCCommandArgumentDescriptor
```
Return the descriptor of the arguments of this command
### validate
```gdscript
func validate(arguments: Array)
```
Validate wether the given arguments match the command descriptor
### run
```gdscript
func run(command_params: Array) -> var
```
Run the command

View File

@@ -18,21 +18,46 @@ export var transition_name: String = ""
## Method Descriptions
### fade\_out
### transition\_out
```gdscript
func fade_out() -> var
func transition_out(p_transition_name: String = "") -> var
```
Fade out the transition
Transition out
### fade\_in
## Parameters
- p_transition_name: name of the transition to play (if empty string, uses
the default transition)
### transition\_in
```gdscript
func fade_in() -> var
func transition_in(p_transition_name: String = "") -> var
```
Fade in the transition
Transition in
## Parameters
- p_transition_name: name of the transition to play (if empty string, uses
the default transition)
### has\_transition
```gdscript
func has_transition(p_name: String) -> bool
```
Returns true whether the transition scene has a transition corresponding
to name provided.
## Parameters
- p_name: The name of the transition to test
*Returns* true if a transition exists with given name.
## Signals

View File

@@ -193,11 +193,15 @@ to zoom into position.
Shift camera by `x` and `y` pixels over `time` seconds. `type` is any of the
Tween.TransitionType values without the prefix, eg. LINEAR, QUART or CIRC;
defaults to QUART.
#### <a name="ChangeSceneCommand.md"></a>`change_scene path run_events` [API-Doc](api/ChangeSceneCommand.md)
#### <a name="ChangeSceneCommand.md"></a>`change_scene path [disable_automatic_transition] [run_events]` [API-Doc](api/ChangeSceneCommand.md)
Loads a new scene, specified by "path". The `run_events` variable is a
boolean (default true) which you never want to set manually! It's there only
to benefit save games, so they don't conflict with the scene's events.
Loads a new scene, specified by "path".
 The `disable_automatic_transition` is a boolean (default false) can be set
to true to disable automatic transitions between scenes, to allow you
to control your transitions manually using the `transition` command.
The `run_events` variable is a boolean (default true) which you never want
to set manually! It's there only to benefit save games, so they don't
conflict with the scene's events.
#### <a name="CustomCommand.md"></a>`custom object node func_name [params]` [API-Doc](api/CustomCommand.md)
Calls the function `func_name` of the node `node` of object `object` with
@@ -344,6 +348,9 @@ Sets the position of object1 to the position of object2.
#### <a name="TeleportPosCommand.md"></a>`teleport_pos object1 x y` [API-Doc](api/TeleportPosCommand.md)
Sets the position of object1 to the position (x,y).
#### <a name="TransitionCommand.md"></a>`transition transition_name in|out` [API-Doc](api/TransitionCommand.md)
Performs a transition in our out manually.
#### <a name="TurnToCommand.md"></a>`turn_to object degrees [immediate]` [API-Doc](api/TurnToCommand.md)
Turns object to a degrees angle with a directions animation.