Basic player controls and aiming
This commit is contained in:
parent
56695d303e
commit
f5999da412
114 changed files with 6611 additions and 2 deletions
15
addons/godot_state_charts/any_of_guard.gd
Normal file
15
addons/godot_state_charts/any_of_guard.gd
Normal file
|
@ -0,0 +1,15 @@
|
|||
@tool
|
||||
@icon("any_of_guard.svg")
|
||||
|
||||
## A composite guard, that is satisfied if any of the guards are satisfied.
|
||||
class_name AnyOfGuard
|
||||
extends Guard
|
||||
|
||||
## The guards of which at least one must be satisfied. If empty, this guard is not satisfied.
|
||||
@export var guards: Array[Guard] = []
|
||||
|
||||
func is_satisfied(context_transition:Transition, context_state:StateChartState) -> bool:
|
||||
for guard in guards:
|
||||
if guard.is_satisfied(context_transition, context_state):
|
||||
return true
|
||||
return false
|
Reference in a new issue