End of chapter 6. A lot of problems took to much time to solve. It was good to know better Godot internal mechanism.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
extends Timer
|
||||
|
||||
class_name CommandProcessor
|
||||
signal BROADCAST_COMMAND(label)
|
||||
|
||||
var resumeWaiting:bool = true
|
||||
@@ -16,17 +15,15 @@ func processCommand(command:Command):
|
||||
return
|
||||
|
||||
stop()
|
||||
|
||||
command.COMMAND_PROCESSED.connect(onCommandProcessed)
|
||||
|
||||
BROADCAST_COMMAND.emit(command.getCommandText())
|
||||
|
||||
emit_signal("BROADCAST_COMMAND", command.getCommandText())
|
||||
command.execute()
|
||||
|
||||
|
||||
func waitForCommand():
|
||||
resumeWaiting = true
|
||||
start()
|
||||
CommandDispatcher.DISPLAY_COMMAND_PROMPT.emit()
|
||||
|
||||
|
||||
func pauseProcessor():
|
||||
|
||||
Reference in New Issue
Block a user