Restructure to use more strategy/GOAP pattern
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
class_name StrategyStack extends Node
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
tree_entered.connect(add_action)
|
||||
tree_exited.connect(remove_action)
|
||||
|
||||
|
||||
func add_action() -> void:
|
||||
pass
|
||||
|
||||
func remove_action() -> void:
|
||||
pass
|
||||
|
||||
func process_action(jet: Jet) -> void:
|
||||
var action = get_child(0)
|
||||
if not action: return
|
||||
action.do(jet)
|
||||
Reference in New Issue
Block a user