Platformer 2.0

This commit is contained in:
2026-07-07 19:03:53 -07:00
commit db83628775
23 changed files with 323 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
extends Resource
class_name StateTransition
const ANY_STATE: StringName = &"*"
@export var from: StringName = ANY_STATE
@export var to: StringName
@export var priority: int = 0
@export var condition: TransitionCondition
func matches_current(current_id: StringName) -> bool:
return from == ANY_STATE or from == current_id
func is_satisfied(data: Object) -> bool:
return condition == null or condition.evaluate(data)