瀏覽代碼

取消弓箭手击飞

SZAND\msx_2 1 年之前
父節點
當前提交
22b35df526

+ 3 - 1
ActionTowerDefense/Assets/Resources/Prefab/Demonic_Arrow.prefab

@@ -727,6 +727,8 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   owner: {fileID: 0}
+  smoke: {fileID: 0}
+  hitRate: 1
 --- !u!1 &7414577738945366659
 GameObject:
   m_ObjectHideFlags: 0
@@ -1028,7 +1030,7 @@ MonoBehaviour:
   beTargetCharacter: []
   searchTrigger: {fileID: 3566347593191160092}
   targetTypes: 0400000005000000
-  canHitFly: 1
+  canHitFly: 0
   linked: 0
   joint: {fileID: 0}
   rope: {fileID: 0}

+ 3 - 1
ActionTowerDefense/Assets/Resources/Prefab/Enemy_Arrow.prefab

@@ -727,6 +727,8 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   owner: {fileID: 0}
+  smoke: {fileID: 0}
+  hitRate: 1
 --- !u!1 &7414577738945366659
 GameObject:
   m_ObjectHideFlags: 0
@@ -1028,7 +1030,7 @@ MonoBehaviour:
   beTargetCharacter: []
   searchTrigger: {fileID: 3566347593191160092}
   targetTypes: 010000000300000002000000
-  canHitFly: 1
+  canHitFly: 0
   linked: 0
   joint: {fileID: 0}
   rope: {fileID: 0}

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

@@ -413,6 +413,8 @@ public class PlayerController : MoveCharacter
             isClickBtnEast = true;
         }
     }
+
+    public bool isUltimate;     //英灵释放大招
     void OnSummonSpirit()
     {
         if (!isFloat && canMove)
@@ -424,6 +426,7 @@ public class PlayerController : MoveCharacter
             else if(currentSpirit == 0)
             {
                 //释放技能,此处暂时先写解除变身
+                isUltimate = true;
                 EndTransfiguration(endChange);
             }
         }
@@ -439,6 +442,7 @@ public class PlayerController : MoveCharacter
             else if(currentSpirit == 1)
             {
                 //释放技能,此处暂时先写解除变身
+                isUltimate = true;
                 EndTransfiguration(endChange);
             }
         }
@@ -454,6 +458,7 @@ public class PlayerController : MoveCharacter
             else if(currentSpirit == 2)
             {
                 //释放技能,此处暂时先写解除变身
+                isUltimate = true;
                 EndTransfiguration(endChange);
             }
         }
@@ -469,6 +474,7 @@ public class PlayerController : MoveCharacter
             else if(currentSpirit == 3)
             {
                 //释放技能,此处暂时先写解除变身
+                isUltimate = true;
                 EndTransfiguration(endChange);
             }
         }
@@ -1525,6 +1531,8 @@ public class PlayerController : MoveCharacter
         ChangeState(CharacterState.Idle);
     }
 
+    public bool endTranSummon;  //是否在结束变身后召唤英灵
+
     public void EndTransfiguration(int id)
     {
         isTransfiguration = false;
@@ -1549,7 +1557,10 @@ public class PlayerController : MoveCharacter
         uiHp.gameObject.SetActive(true);
         spiritObj.transform.parent = null;
         spiritObj.SetActive(false);
-        Summon(id);
+        if (endTranSummon)
+        {
+            Summon(id);
+        }
         CheckPlayerChangeState();
         endChange = 0;
     }