Bläddra i källkod

使魔召唤后自动使用attack1

wulifu 1 år sedan
förälder
incheckning
dfca6d5664

+ 2 - 2
ActionTowerDefense/Assets/Scripts/Demonic.cs

@@ -88,7 +88,7 @@ public class Demonic : MonoBehaviour
             case DemonicState.Idle:
                 if (isAttack)
                 {
-                    ChangeState(DemonicState.Attack1);
+                    ChangeState(DemonicState.Attack2);
                     break;
                 }
                 if (!foot.TrigGround)
@@ -114,7 +114,7 @@ public class Demonic : MonoBehaviour
             case DemonicState.Walk:
                 if (isAttack)
                 {
-                    ChangeState(DemonicState.Attack1);
+                    ChangeState(DemonicState.Attack2);
                     break;
                 }
                 if (!foot.TrigGround)

+ 1 - 0
ActionTowerDefense/Assets/Scripts/PlayerController.cs

@@ -777,5 +777,6 @@ public class PlayerController : MonoBehaviour
             demonicObj.transform.position = transform.position + new Vector3(-offset.x, offset.y, offset.z);
             demonicObj.transform.localScale = new Vector3(-1, 1, 1);
         }
+        demonic.ChangeState(DemonicState.Attack1);
     }
 }