예제 #1
0
    void UpdateCrosshairState()
    {
        theCrosshair.StandState();

        if (Mathf.Abs(theGravity.GetVelocityY()) >= 5f || !theGravity.IsGrounded())
        {
            theCrosshair.JumpState();
        }
        else if (curSpeed > runSpeed)
        {
            theCrosshair.RunState();
        }
        else if (curSpeed > 0.1f)
        {
            theCrosshair.WalkState();
        }
    }