import the woofer
This commit is contained in:
parent
825fee53e2
commit
3e89acfea8
92 changed files with 5783 additions and 0 deletions
18
addons/godot_state_charts/not_guard.gd
Normal file
18
addons/godot_state_charts/not_guard.gd
Normal file
|
@ -0,0 +1,18 @@
|
|||
@tool
|
||||
@icon("not_guard.svg")
|
||||
## A guard which is satisfied when the given guard is not satisfied.
|
||||
class_name NotGuard
|
||||
extends Guard
|
||||
|
||||
## The guard that should not be satisfied. When null, this guard is always satisfied.
|
||||
@export var guard: Guard
|
||||
|
||||
func is_satisfied(context_transition:Transition, context_state:StateChartState) -> bool:
|
||||
if guard == null:
|
||||
return true
|
||||
return not guard.is_satisfied(context_transition, context_state)
|
||||
|
||||
func get_supported_trigger_types() -> int:
|
||||
if guard == null:
|
||||
return StateChart.TriggerType.NONE
|
||||
return guard.get_supported_trigger_types()
|
Loading…
Add table
Add a link
Reference in a new issue