End of lesson 18 The command processor, Chapter 5

This commit is contained in:
2025-04-05 19:27:03 -03:00
parent d6ef6289ea
commit 909c385dee
22 changed files with 174 additions and 47 deletions

View File

@@ -0,0 +1,13 @@
class_name Command
signal COMMAND_PROCESSED(label)
var commandLabel
func execute():
COMMAND_PROCESSED.emit(commandLabel)
func getCommandText():
return commandLabel

View File

@@ -0,0 +1 @@
uid://b4ee6hsxy7qwc

View File

@@ -0,0 +1,5 @@
extends Node
signal PROCESS_COMMAND(command)
signal WAIT_FOR_COMMAND
signal PAUSE_PROCESSOR

View File

@@ -0,0 +1 @@
uid://buuwlxv16l2lu

View File

@@ -0,0 +1,10 @@
extends Command
class_name PassCommand
func _init() -> void:
commandLabel = "Pass"
func execute():
print("Player passed.")
COMMAND_PROCESSED.emit(commandLabel)

View File

@@ -0,0 +1 @@
uid://1a8ulyob7ld5