public override void onUpdate(PlayerFSM FSM) { print("Idle"); if (Input.GetKey(ButtonConfig.key.jump)) { FSM.SetState(FSM.JumpState); } if (Input.GetKey(ButtonConfig.key.left) || Input.GetKey(ButtonConfig.key.right)) { FSM.SetState(FSM.RunState); } }
public override void onUpdate(PlayerFSM FSM) { print("Jump"); CheckGrounded(); if (isGrounded) { FSM.SetState(FSM.IdleState); } }