Moved and split escoria._ev_left_click_on_item() function into ESCController (#371)

* Moved and split escoria._ev_left_click_on_item() function into ESCController.
Added a boolean in ESCWalkContext to hold whether interact should happen after destination is reached.

Co-authored-by: StraToN <StraToN@users.noreply.github.com>
This commit is contained in:
Julian MurgiaandStraToN authored and GitHub committed 2021-08-24 08:19:55 +02:00
1 parent fc3ea147a7
commit b230966fc6
11 files changed
+396 -225

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
<!-- Auto-generated from JSON by GDScript docs maker. Do not edit this document directly. -->
# ESCController
## Method Descriptions
### perform\_walk
```gdscript
func perform_walk(moving_obj: ESCObject, destination, is_fast: bool = false)
```
### perform\_inputevent\_on\_object
```gdscript
func perform_inputevent_on_object(obj: ESCObject, event: InputEvent, default_action: bool = false)
```
+8
View File
@@ -57,6 +57,14 @@ The global id fo the topmost item from the hover_stack
## Method Descriptions
### register\_core
```gdscript
func register_core()
```
Register core signals (from escoria.gd)
### register\_inventory\_item
```gdscript
+10 -2
View File
@@ -33,13 +33,21 @@ The target position
var fast: bool
```
Wether to move fast
Whether to move fast
### dont\_interact\_on\_arrival
```gdscript
var dont_interact_on_arrival: bool
```
Whether an interaction should NOT happen after walk reaches destination
## Method Descriptions
### \_init
```gdscript
func _init(p_target_object: ESCObject, p_target_position: Vector2, p_fast: bool)
func _init(p_target_object: ESCObject, p_target_position: Vector2, p_fast: bool, p_dont_interact_on_arrival: bool)
```
+16 -5
View File
@@ -193,6 +193,15 @@ var save_manager: ESCSaveManager
Savegames and settings manager
### controller
```gdscript
var controller: ESCController
```
The controller in charge of converting an action verb on a game object
into an actual action
## Method Descriptions
### new\_game
@@ -219,12 +228,14 @@ Run a generic action
### set\_game\_paused
```gdscript
func set_game_paused()
func set_game_paused(p_paused: bool)
```
### set\_game\_unpaused
Pauses or unpause the game
```gdscript
func set_game_unpaused()
```
#### Parameters
- p_paused: if true, pauses the game. If false, unpauses the game.
## Signals
- signal request_pause_menu(): Signal sent when pause menu has to be displayed