private void Rotate () { anim.SetBool ("isRotating", true); if (input.horizontalInput == 0) { stateMethod = new actorState (Idle); anim.SetBool ("isRotating", false); } }
private void Move () { if (input.verticalInput == 0) { stateMethod = new actorState (Idle); anim.SetBool ("isMoving", false); } }
private void Idle () { if (input.verticalInput != 0.0f) { stateMethod = new actorState (Move); anim.SetTrigger ("move"); } if (input.horizontalInput != 0.0f) { stateMethod = new actorState (Rotate); anim.SetTrigger ("rotate"); } }
public void Start () { stateMethod = new actorState (Idle); }