Issue 315 (#341)
* feat: accept_input implemented * feat: More fixes for accept_input and tests for it * feat: play_snd implemented * fix: Removed game_over and queue_animation commands * docs: Automatic update of API docs * fix: FIxes schedule_event command * feat: Implemented slide and slide_block * feat: Implemented turn_to * docs: Automatic update of API docs Co-authored-by: Dennis Ploeger <develop@dieploegers.de> Co-authored-by: dploeger <dploeger@users.noreply.github.com>
This commit is contained in:
@@ -17,7 +17,6 @@ This allows you to create cut scenes with SKIP where the dialog can be
|
||||
skipped, but also initiate locked#### down cutscenes with accept_input
|
||||
NONE in :setup and accept_input ALL later in :ready.
|
||||
|
||||
@STUB
|
||||
@ESC
|
||||
|
||||
## Method Descriptions
|
||||
|
||||
@@ -35,7 +35,7 @@ Preload the dialog UI resources
|
||||
### say
|
||||
|
||||
```gdscript
|
||||
func say(character: String, params: Dictionary) -> var
|
||||
func say(character: String, ui: String, line: String) -> var
|
||||
```
|
||||
|
||||
A short one line dialog
|
||||
@@ -43,8 +43,8 @@ A short one line dialog
|
||||
#### Parameters
|
||||
|
||||
- character: Character that is talking
|
||||
- params: A dictionary of parameters. Currently only "line" is supported and
|
||||
holds the line the character should say
|
||||
- ui: UI to use for the dialog
|
||||
- line: Line to say
|
||||
|
||||
### finish\_fast
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!-- Auto-generated from JSON by GDScript docs maker. Do not edit this document directly. -->
|
||||
|
||||
# inputs\_manager.gd
|
||||
# ESCInputsManager
|
||||
|
||||
**Extends:** [Node](../Node)
|
||||
|
||||
@@ -9,8 +9,36 @@
|
||||
Escoria inputs manager
|
||||
Catches, handles and distributes input events for the game
|
||||
|
||||
## Constants Descriptions
|
||||
|
||||
### INPUT\_ALL
|
||||
|
||||
```gdscript
|
||||
const INPUT_ALL: int = 0
|
||||
```
|
||||
|
||||
### INPUT\_NONE
|
||||
|
||||
```gdscript
|
||||
const INPUT_NONE: int = 1
|
||||
```
|
||||
|
||||
### INPUT\_SKIP
|
||||
|
||||
```gdscript
|
||||
const INPUT_SKIP: int = 2
|
||||
```
|
||||
|
||||
## Property Descriptions
|
||||
|
||||
### input\_mode
|
||||
|
||||
```gdscript
|
||||
var input_mode
|
||||
```
|
||||
|
||||
The current input mode
|
||||
|
||||
### hover\_stack
|
||||
|
||||
```gdscript
|
||||
@@ -346,7 +346,9 @@ Set the angle
|
||||
|
||||
#### Parameters
|
||||
|
||||
Set the angle
|
||||
- deg: The angle degree to set
|
||||
- immediate: Set the angle immediately. If false will show intermediate
|
||||
angles
|
||||
|
||||
### start\_talking
|
||||
|
||||
|
||||
@@ -34,4 +34,14 @@ The number of seconds until the event is run
|
||||
func _init(p_event: ESCEvent, p_timeout: float)
|
||||
```
|
||||
|
||||
Create a new scheduled event
|
||||
Create a new scheduled event
|
||||
|
||||
### run
|
||||
|
||||
```gdscript
|
||||
func run() -> int
|
||||
```
|
||||
|
||||
Run the event
|
||||
|
||||
**Returns** The execution code
|
||||
@@ -1,35 +0,0 @@
|
||||
<!-- Auto-generated from JSON by GDScript docs maker. Do not edit this document directly. -->
|
||||
|
||||
# GameOverCommand
|
||||
|
||||
**Extends:** [ESCBaseCommand](../ESCBaseCommand) < [Node](../Node)
|
||||
|
||||
## Description
|
||||
|
||||
`game_over continue_enabled show_credits`
|
||||
|
||||
Ends the game. Use the "continue_enabled" parameter to enable or disable the
|
||||
continue button in the main menu afterwards. The "show_credits" parameter
|
||||
loads the ui/end_credits scene if true. You can configure it to your regular
|
||||
credits scene if you want.
|
||||
|
||||
@STUB
|
||||
@ESC
|
||||
|
||||
## Method Descriptions
|
||||
|
||||
### configure
|
||||
|
||||
```gdscript
|
||||
func configure() -> ESCCommandArgumentDescriptor
|
||||
```
|
||||
|
||||
Return the descriptor of the arguments of this command
|
||||
|
||||
### run
|
||||
|
||||
```gdscript
|
||||
func run(command_params: Array) -> int
|
||||
```
|
||||
|
||||
Run the command
|
||||
@@ -6,13 +6,11 @@
|
||||
|
||||
## Description
|
||||
|
||||
`play_snd object file [loop]`
|
||||
`play_snd file [player]`
|
||||
|
||||
Plays the sound specificed with the "file" parameter on the object, without
|
||||
blocking. You can play background sounds, eg. during scene changes, with
|
||||
`play_snd bg_snd res://...`
|
||||
Plays the sound specificed with the "file" parameter on the sound player
|
||||
`player`, without blocking. (player defaults to bg_sound)
|
||||
|
||||
@STUB
|
||||
@ESC
|
||||
|
||||
## Method Descriptions
|
||||
@@ -25,6 +23,14 @@ 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
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
<!-- Auto-generated from JSON by GDScript docs maker. Do not edit this document directly. -->
|
||||
|
||||
# QueueAnimationCommand
|
||||
|
||||
**Extends:** [ESCBaseCommand](../ESCBaseCommand) < [Node](../Node)
|
||||
|
||||
## Description
|
||||
|
||||
`queue_animation object animation`
|
||||
|
||||
Similar to queue_resource, queues the resources necessary to have an
|
||||
animation loaded on an item. The resource paths are taken from the item
|
||||
placeholders.
|
||||
|
||||
@STUB
|
||||
@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) -> int
|
||||
```
|
||||
|
||||
Run the command
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# SlideBlockCommand
|
||||
|
||||
**Extends:** [ESCBaseCommand](../ESCBaseCommand) < [Node](../Node)
|
||||
**Extends:** [SlideCommand](../SlideCommand) < [ESCBaseCommand](../ESCBaseCommand) < [Node](../Node)
|
||||
|
||||
## Description
|
||||
|
||||
@@ -18,26 +18,10 @@ where the player can't walk.
|
||||
|
||||
## 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) -> int
|
||||
func run(command_params: Array) -> var
|
||||
```
|
||||
|
||||
Run the command
|
||||
@@ -1,40 +0,0 @@
|
||||
<!-- Auto-generated from JSON by GDScript docs maker. Do not edit this document directly. -->
|
||||
|
||||
# SpawnCommand
|
||||
|
||||
**Extends:** [ESCBaseCommand](../ESCBaseCommand) < [Node](../Node)
|
||||
|
||||
## Description
|
||||
|
||||
`spawn path [object2]`
|
||||
|
||||
Instances a scene determined by "path", and places in the position of
|
||||
object2 (object2 is optional)
|
||||
|
||||
@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) -> int
|
||||
```
|
||||
|
||||
Run the command
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
## Description
|
||||
|
||||
`turn_to object degrees`
|
||||
`turn_to object degrees [immediate]`
|
||||
|
||||
Turns object to a degrees angle with a directions animation.
|
||||
|
||||
@@ -15,6 +15,9 @@ When turning to the destination angle, animations are played if they're
|
||||
defined in animations. object must be player or interactive. degrees must
|
||||
be between [0, 360] or an error is reported.
|
||||
|
||||
Set immediate to true to show directly switch to the direction and not
|
||||
show intermediate angles
|
||||
|
||||
@STUB
|
||||
@ESC
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
## Description
|
||||
|
||||
A dialog GUI showing a dialog box and character portraits
|
||||
|
||||
## Property Descriptions
|
||||
|
||||
### current\_character
|
||||
@@ -16,29 +18,7 @@ export var current_character = ""
|
||||
|
||||
- **Setter**: `set_current_character`
|
||||
|
||||
### avatar\_node
|
||||
|
||||
```gdscript
|
||||
var avatar_node
|
||||
```
|
||||
|
||||
### name\_node
|
||||
|
||||
```gdscript
|
||||
var name_node
|
||||
```
|
||||
|
||||
### text\_node
|
||||
|
||||
```gdscript
|
||||
var text_node
|
||||
```
|
||||
|
||||
### tween
|
||||
|
||||
```gdscript
|
||||
var tween
|
||||
```
|
||||
The currently speaking character
|
||||
|
||||
### text\_speed\_per\_character
|
||||
|
||||
@@ -46,18 +26,56 @@ var tween
|
||||
export var text_speed_per_character = 0.1
|
||||
```
|
||||
|
||||
The text speed per character for normal display
|
||||
|
||||
### fast\_text\_speed\_per\_character
|
||||
|
||||
```gdscript
|
||||
export var fast_text_speed_per_character = 0.25
|
||||
```
|
||||
|
||||
The text speed per character if the dialog line is skipped
|
||||
|
||||
### max\_time\_to\_text\_disappear
|
||||
|
||||
```gdscript
|
||||
export var max_time_to_text_disappear = 1
|
||||
```
|
||||
|
||||
The time to wait before the dialog is finished
|
||||
|
||||
### avatar\_node
|
||||
|
||||
```gdscript
|
||||
var avatar_node
|
||||
```
|
||||
|
||||
The node holding the avatar
|
||||
|
||||
### name\_node
|
||||
|
||||
```gdscript
|
||||
var name_node
|
||||
```
|
||||
|
||||
The node holding the player name
|
||||
|
||||
### text\_node
|
||||
|
||||
```gdscript
|
||||
var text_node
|
||||
```
|
||||
|
||||
The node showing the text
|
||||
|
||||
### tween
|
||||
|
||||
```gdscript
|
||||
var tween
|
||||
```
|
||||
|
||||
The tween node for text animations
|
||||
|
||||
## Method Descriptions
|
||||
|
||||
### set\_current\_character
|
||||
@@ -66,19 +84,32 @@ export var max_time_to_text_disappear = 1
|
||||
func set_current_character(name: String)
|
||||
```
|
||||
|
||||
Switch the current character
|
||||
|
||||
#### Parameters
|
||||
- name: The name of the current character
|
||||
|
||||
### say
|
||||
|
||||
```gdscript
|
||||
func say(character: String, params: Dictionary)
|
||||
func say(character: String, line: String)
|
||||
```
|
||||
|
||||
Make a character say something
|
||||
|
||||
#### Parameters
|
||||
- character: The global id of the character speaking
|
||||
- line: Line to say
|
||||
|
||||
### finish\_fast
|
||||
|
||||
```gdscript
|
||||
func finish_fast()
|
||||
```
|
||||
|
||||
Called by the dialog player when the
|
||||
|
||||
## Signals
|
||||
|
||||
- signal dialog_line_started():
|
||||
- signal dialog_line_finished():
|
||||
- signal dialog_line_started(): Signal emitted when a dialog line has started
|
||||
- signal dialog_line_finished(): Signal emitted when a dialog line has finished
|
||||
|
||||
@@ -6,38 +6,34 @@
|
||||
|
||||
## Description
|
||||
|
||||
A dialog UI using a label above the head of the character
|
||||
|
||||
## Property Descriptions
|
||||
|
||||
### tween
|
||||
|
||||
```gdscript
|
||||
var tween
|
||||
```
|
||||
|
||||
### text\_node
|
||||
|
||||
```gdscript
|
||||
var text_node
|
||||
```
|
||||
|
||||
### text\_speed\_per\_character
|
||||
|
||||
```gdscript
|
||||
export var text_speed_per_character = 0.1
|
||||
```
|
||||
|
||||
The text speed per character for normal display
|
||||
|
||||
### fast\_text\_speed\_per\_character
|
||||
|
||||
```gdscript
|
||||
export var fast_text_speed_per_character = 0.25
|
||||
```
|
||||
|
||||
The text speed per character if the dialog line is skipped
|
||||
|
||||
### max\_time\_to\_text\_disappear
|
||||
|
||||
```gdscript
|
||||
export var max_time_to_text_disappear = 2
|
||||
```
|
||||
|
||||
The time to wait before the dialog is finished
|
||||
|
||||
### current\_character
|
||||
|
||||
```gdscript
|
||||
@@ -46,21 +42,45 @@ var current_character
|
||||
|
||||
Current character speaking, to keep track of reference for animation purposes
|
||||
|
||||
### tween
|
||||
|
||||
```gdscript
|
||||
var tween
|
||||
```
|
||||
|
||||
Tween node for text animation
|
||||
|
||||
### text\_node
|
||||
|
||||
```gdscript
|
||||
var text_node
|
||||
```
|
||||
|
||||
The node showing the text
|
||||
|
||||
## Method Descriptions
|
||||
|
||||
### say
|
||||
|
||||
```gdscript
|
||||
func say(character: String, params: Dictionary)
|
||||
func say(character: String, line: String)
|
||||
```
|
||||
|
||||
Make a character say something
|
||||
|
||||
#### Parameters
|
||||
- character: The global id of the character speaking
|
||||
- line: Line to say
|
||||
|
||||
### finish\_fast
|
||||
|
||||
```gdscript
|
||||
func finish_fast()
|
||||
```
|
||||
|
||||
Called by the dialog player when the
|
||||
|
||||
## Signals
|
||||
|
||||
- signal dialog_line_started():
|
||||
- signal dialog_line_finished():
|
||||
- signal dialog_line_started(): Signal emitted when a dialog line has started
|
||||
- signal dialog_line_finished(): Signal emitted when a dialog line has finished
|
||||
|
||||
@@ -132,7 +132,7 @@ Terrain of the current room
|
||||
### dialog\_player
|
||||
|
||||
```gdscript
|
||||
var dialog_player
|
||||
var dialog_player: ESCDialogsPlayer
|
||||
```
|
||||
|
||||
Dialog player instantiator. This instance is called directly for dialogs.
|
||||
@@ -180,7 +180,7 @@ The main scene
|
||||
### inputs\_manager
|
||||
|
||||
```gdscript
|
||||
var inputs_manager
|
||||
var inputs_manager: ESCInputsManager
|
||||
```
|
||||
|
||||
The escoria inputs manager
|
||||
|
||||
Reference in New Issue
Block a user