Browse Source

冲刺瞄准线不会消失了

LAPTOP-OM1V99U2\永远de小亡灵 1 year ago
parent
commit
9e7e8cbc36
1 changed files with 7 additions and 1 deletions
  1. 7 1
      ActionTowerDefense/Assets/Scripts/Enemy.cs

+ 7 - 1
ActionTowerDefense/Assets/Scripts/Enemy.cs

@@ -507,11 +507,12 @@ public class Enemy : MoveCharacter
                 dashEffect.canHit = false;
                 dashEffect.canHit = false;
                 rb.velocity = Vector3.zero;
                 rb.velocity = Vector3.zero;
                 bodyTrans.rotation = Quaternion.Euler(Vector3.zero);
                 bodyTrans.rotation = Quaternion.Euler(Vector3.zero);
+
                 break;
                 break;
             case CharacterState.ReadyToDownRush:
             case CharacterState.ReadyToDownRush:
                 rb.constraints = 
                 rb.constraints = 
                     RigidbodyConstraints.FreezePositionZ|RigidbodyConstraints.FreezeRotation;
                     RigidbodyConstraints.FreezePositionZ|RigidbodyConstraints.FreezeRotation;
-                ReadyToDash(rushEndPos + Vector3.up, transform.position + Vector3.up);
+                
                 break;
                 break;
             case CharacterState.DownRush:
             case CharacterState.DownRush:
                 
                 
@@ -590,6 +591,7 @@ public class Enemy : MoveCharacter
                 aimEffect.SetActive(true);
                 aimEffect.SetActive(true);
                 aimDistance = rushTime * rushSpeed / 2;
                 aimDistance = rushTime * rushSpeed / 2;
                 rb.constraints = RigidbodyConstraints.FreezeAll;
                 rb.constraints = RigidbodyConstraints.FreezeAll;
+                ReadyToDash(rushEndPos + Vector3.up, transform.position + Vector3.up);
                 break;
                 break;
             case CharacterState.Rush:
             case CharacterState.Rush:
                 dashEffect.canHit = true;
                 dashEffect.canHit = true;
@@ -606,6 +608,10 @@ public class Enemy : MoveCharacter
                 ani.Play("attack_summon", 0, 0);
                 ani.Play("attack_summon", 0, 0);
                 dashEffect.canHit = true;
                 dashEffect.canHit = true;
                 break;
                 break;
+            case CharacterState.FinishRush:
+                ani.Play("idle", 0, 0);
+                aniCollider.Play("Idle", 0, 0);
+                break;
             default:
             default:
                 break;
                 break;
         }
         }