Added a method to interrupt a running event in ESCEventManager. (#375)

Co-authored-by: StraToN <StraToN@users.noreply.github.com>
This commit is contained in:
Julian MurgiaandStraToN authored and GitHub committed 2021-08-27 08:16:12 +02:00
1 parent 1f28fdc8f3
commit 711cfe9888
10 files changed
+238 -29

No files matched your search

+9
View File
@@ -44,6 +44,15 @@ func schedule_event(event: ESCEvent, timeout: float) -> void
Schedule an event to run after a timeout
### interrupt\_running\_event
```gdscript
func interrupt_running_event()
```
Interrupt the event currently running.
## Signals
- signal event_finished(event_name, return_code): Emitted when the event did finish running
- signal event_interrupted(event_name, return_code): Emitted when the event was interrupted
+9
View File
@@ -36,6 +36,15 @@ func run() -> var
Execute this statement and return its return code
### interrupt
```gdscript
func interrupt()
```
Interrupt the statement in the middle of its execution.
## Signals
- signal finished(return_code): Emitted when the event did finish running
- signal interrupted(return_code): Emitted when the event was interrupted
+3 -1
View File
@@ -215,7 +215,7 @@ Called by Main menu "start new game"
### do
```gdscript
func do(action: String, params: Array) -> void
func do(action: String, params: Array, can_interrupt: bool = false) -> void
```
Run a generic action
@@ -224,6 +224,8 @@ Run a generic action
- action: type of the action to run
- params: Parameters for the action
- can_interrupt: if true, this command will interrupt any ongoing event
before it is finished
### set\_game\_paused