Răsfoiți Sursa

白鹭文件补传

GrainFull 1 săptămână în urmă
părinte
comite
6a1351beec

+ 2 - 2
ActionTowerDefense/Assets/Resources/Prefab/Enemy/Enemy_Egret.prefab

@@ -609,7 +609,6 @@ MeshRenderer:
   m_RendererPriority: 0
   m_Materials:
   - {fileID: 2100000, guid: 5593775b4c6e75f4890fefc0df07f5b9, type: 2}
-  - {fileID: 2100000, guid: cd83f82aa01ea144fae3d29d40a9504c, type: 2}
   m_StaticBatchInfo:
     firstSubMesh: 0
     subMeshCount: 0
@@ -1646,7 +1645,7 @@ MonoBehaviour:
       endType: 1
       endKeyName: attack_off
       endKeyTime: 1.7666668
-    totalTime: 5.4
+    totalTime: 7
   - aniName: attack_summon
     keys:
     - attackType: 0
@@ -1690,6 +1689,7 @@ MonoBehaviour:
   riseDirection: {x: 0, y: 1, z: 0}
   canDash: 1
   isFind: 1
+  isBreakEnd: 0
   useLocalSpace: 1
   drag: 0
   maxSpeed: 2000

+ 12 - 4
ActionTowerDefense/Assets/Scripts/Skills/chargeDownward.cs

@@ -38,6 +38,7 @@ public class chargeDownward : MonoBehaviour
     [LabelText("能否冲刺")]
     public bool canDash = true;
     public bool isFind = true;
+    public bool isBreakEnd = false;
 
     [LabelText("是否使用本地坐标")]
     public bool useLocalSpace = true;
@@ -76,10 +77,11 @@ public class chargeDownward : MonoBehaviour
     {
         if (owner.state != CharacterState.Attack)
         {
-            if (owner.state != CharacterState.FramePause || owner.state != CharacterState.HitStun)
+            if (owner.state != CharacterState.FramePause && owner.state != CharacterState.HitStun && owner.state != CharacterState.Idle)
             {
                 canDash = true;
                 IsDashing = false;
+                isBreakEnd = false;
                 isBreaking = false;
                 IsRising = false;
                 isFind = true;
@@ -97,6 +99,7 @@ public class chargeDownward : MonoBehaviour
             {
                 foot.SetActive(true);
             }
+            currentState = MovementState.Idle;
             return;
         }
         else
@@ -116,7 +119,11 @@ public class chargeDownward : MonoBehaviour
                     StartDash();
                     currentState = MovementState.Dashing;
                 }
-                else if (!canDash && !attackController.isAttackTriggerOn && !isBreaking)
+                else if (!canDash && !attackController.isAttackTriggerOn && !isBreakEnd)
+                {
+                    currentState = MovementState.Breaking;
+                }
+                else if (!canDash && !attackController.isAttackTriggerOn && !isBreaking && isBreakEnd)
                 {
                     StartRise();
                     currentState = MovementState.Rising;
@@ -198,7 +205,6 @@ public class chargeDownward : MonoBehaviour
     public void StartRise()
     {
         if (IsRising || isBreaking) return;
-
         riseStartPosition = transform.position; // 记录上升起点
         IsRising = true;
         owner.ani.Play("idle", 0, 0);
@@ -219,6 +225,7 @@ public class chargeDownward : MonoBehaviour
         {
             IsRising = false;
             canDash = true;
+            isBreakEnd = false;
             currentState = MovementState.Idle;
             owner.ChangeState(CharacterState.Idle);
             foot.GetComponent<Foot>().trigGroundList.Clear();
@@ -247,6 +254,7 @@ public class chargeDownward : MonoBehaviour
         if (Time.time - breakEndStartTime >= breakEndDuration && !isBreaking)
         { 
            currentState = MovementState.Idle;
+            isBreakEnd = true;
         }
     }
 
@@ -294,7 +302,7 @@ public class chargeDownward : MonoBehaviour
     public bool IsDashing { get; private set; }
     public bool IsRising { get; private set; }
     [ShowInInspector, ReadOnly]
-    private bool isBreaking;
+    public bool isBreaking;
 
     public BeSearchTrigger FindClosestTriggerByX(float selfX)
     {