// Called when the node enters the scene tree for the first time. public override void _Ready() { _animTree = GetNode <AnimationTree>("AnimationTree"); _animTree.Active = true; stateMachine = (AnimationNodeStateMachinePlayback)_animTree.Get("parameters/StateMachine/playback"); state = new AmandaIdle(this); fallingTimer = GetNode <Timer>("FallingTimer"); }
public override void _PhysicsProcess(float delta) { state = checkState(stateMachine.GetCurrentNode()); state._statePhysicsProcess(delta); if (Input.IsActionJustPressed("ui_changeTime")) { if (timeScale == 1) { ChangeTime(5); } else { ChangeTime(1); } } }