Esempio n. 1
0
 public void Dodge()
 {
     if (_isStunned || _isDodging || _dodgeTimes == dodgeCapacity)
     {
         return;
     }
     _dodgeTimes          += 1;
     transform.eulerAngles = new Vector3(0, transform.eulerAngles.y, dodgeAngle);
     _characterMotor.Dodge(dodgeSpeed * (float)_characterMotor.FaceDirection, dodgeDuration);
     _isDodging = true;
     if (hasDodgeTrail)
     {
         EnableDodgeTrail();                        /* EnableTrail(dodgeTrailSettings); */
     }
     if (_dodgeCooldownCoroutine == null)
     {
         _dodgeCooldownCoroutine = StartCoroutine(ExeDodgeCooldownCoroutine());
     }
 }