Ejemplo n.º 1
0
 //
 private void UpdateEyeState()
 {
     if (isJump == true)
     {
         if (rb.velocity.y > 0.1f)
         {
             eye.SetState(Eye.EyeState.UP);
         }
         else if (rb.velocity.y < -0.1f)
         {
             eye.SetState(Eye.EyeState.DOWN);
         }
     }
     else
     {
         if (isCrouch == false)
         {
             eye.SetState(Eye.EyeState.NORMAL);
         }
         if (isCrouch == true)
         {
             eye.SetState(Eye.EyeState.CROUCH);
         }
     }
 }