LAPTOP-OM1V99U2\永远de小亡灵 1 anno fa
parent
commit
5a126afb2f
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      ActionTowerDefense/Assets/Scripts/Enemy.cs

+ 3 - 3
ActionTowerDefense/Assets/Scripts/Enemy.cs

@@ -35,7 +35,7 @@ public class Enemy : MoveCharacter
 
     public float attackRatio;
     public float maxMoveSpeed, minMoveSpeed;
-
+    public float runSpeed;
     public int dropSoul = 1;
     public GameObject soulPrefab;
     public float soulStartSpeed = 5f;
@@ -305,7 +305,7 @@ public class Enemy : MoveCharacter
                 if (leftDir.x > 0.3f)
                 {
                     //rb.velocity += Vector3.right * moveAcc * Time.deltaTime;
-                    rb.velocity = Vector3.right * rushSpeed;
+                    rb.velocity = Vector3.right * runSpeed;
                     //if (rb.velocity.x > maxMoveSpeed)
                     //{
                     //    rb.velocity = new Vector3(maxMoveSpeed, rb.velocity.y, rb.velocity.z);
@@ -318,7 +318,7 @@ public class Enemy : MoveCharacter
                 else if (leftDir.x < -0.3f)
                 {
                     //rb.velocity -= Vector3.right * moveAcc * Time.deltaTime;
-                    rb.velocity = Vector3.left * rushSpeed;
+                    rb.velocity = Vector3.left * runSpeed;
                     //if (rb.velocity.x < -maxMoveSpeed)
                     //{
                     //    rb.velocity = new Vector3(-maxMoveSpeed, rb.velocity.y, rb.velocity.z);