浏览代码

指挥框架bug修复:指挥时蓝空则无法动弹

SZAND\msx_2 10 月之前
父节点
当前提交
66f6d03648
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      ActionTowerDefense/Assets/Scripts/PlayerController.cs

+ 6 - 2
ActionTowerDefense/Assets/Scripts/PlayerController.cs

@@ -658,8 +658,11 @@ public class PlayerController : MoveCharacter
         {
             if (cacheSummonTime >= 0 && conductTime <= totalCacheSummonTime)
             {
-
                 CheckTurn();
+                if (!CheckCanSummon(cacheSummonId))
+                {
+                    return false;
+                }
                 Summon(cacheSummonId);
                 return true;
             }
@@ -688,7 +691,7 @@ public class PlayerController : MoveCharacter
             isReadyConduct = false;
             return true;
         }
-        if (!isReadyConduct && conductTime >= canConductTime[nowConductButton])
+        if (!isReadyConduct && nowConductButton != -1 && conductTime >= canConductTime[nowConductButton]) 
         {
             conductReadyTip.Show();
             isReadyConduct = true;
@@ -897,6 +900,7 @@ public class PlayerController : MoveCharacter
         else
         {
             print("À¶Á¿²»×ã");
+            ChangeState(CharacterState.Idle);
         }
     }