private void Update() { GetInput(); switch (currentState) { case MovementState.start: startMotor.UpdateMotor(this); break; case MovementState.walking: walkingMotor.UpdateMotor(this); break; case MovementState.falling: fallingMotor.UpdateMotor(this); break; } }
private void Update() { switch (currentState) { case MotorState.start: startMotor.UpdateMotor(this); break; case MotorState.walking: walkingMotor.UpdateMotor(this); break; case MotorState.falling: fallingMotor.UpdateMotor(this); break; } charController.Move(velocity * Time.deltaTime); }
private void Update() { GetInput(); SetAccelDir(); switch (currentState) { case MovementState.start: startMotor.UpdateMotor(this); break; case MovementState.walking: walkingMotor.UpdateMotor(this); break; case MovementState.falling: fallingMotor.UpdateMotor(this); break; case MovementState.swimming: swimmingMotor.UpdateMotor(this); break; } charController.Move(velocity); }