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:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
39
docs/api/TransitionCommand.md
Normal file
39
docs/api/TransitionCommand.md
Normal 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
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user