gamejam-march-28/fox.gd
2025-03-30 18:43:56 -06:00

25 lines
511 B
GDScript

extends Node3D
@onready var playback: AnimationNodeStateMachinePlayback = %AnimationTree.get("parameters/playback")
@export var pouncing := false
func idle():
playback.travel("Idle")
func walk():
playback.travel("Walk")
func pounce():
playback.travel("Pounce")
func is_busy():
return pouncing
func root_motion():
return %AnimationTree.get_root_motion_position()
func strike():
for vole in %VoleCatcher.caught:
if vole.vole().visible:
vole.vole().caught()
%VoleCatcher.caught = Dictionary()