Pārlūkot izejas kodu

1014击飞bug测试

GrainFull 3 mēneši atpakaļ
vecāks
revīzija
1a93ad90a7

+ 9 - 9
ActionTowerDefense/Assets/Resources/Prefab/Enemy/Enemy_1014.prefab

@@ -189,8 +189,8 @@ BoxCollider:
   m_IsTrigger: 1
   m_Enabled: 1
   serializedVersion: 2
-  m_Size: {x: 3.1932826, y: 4.916024, z: 2}
-  m_Center: {x: 1.5477865, y: 1.2948952, z: 0}
+  m_Size: {x: 2.0019312, y: 4.916024, z: 2}
+  m_Center: {x: 1.6623394, y: 1.2948952, z: 0}
 --- !u!114 &9020361017135710302
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -1099,7 +1099,7 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8639832132450015563}
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
-  m_LocalPosition: {x: 0.59, y: 0.4, z: 0}
+  m_LocalPosition: {x: 1, y: 0.61, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []
@@ -1117,7 +1117,7 @@ BoxCollider:
   m_IsTrigger: 1
   m_Enabled: 1
   serializedVersion: 2
-  m_Size: {x: 1.2707447, y: 0.5, z: 2}
+  m_Size: {x: 0.5, y: 0.5, z: 2}
   m_Center: {x: 0.64777595, y: -1.0383594, z: 0}
 --- !u!114 &8639832132450015562
 MonoBehaviour:
@@ -1200,7 +1200,7 @@ MonoBehaviour:
   ani: {fileID: 5978259926173120695}
   totalDieKeepTime: 0.33333334
   totalAttack_summonTime: 0.6666667
-  totalAttack_marchTime: 5.999
+  totalAttack_marchTime: 5.333333
   showInjuryNum: 1
   injuryNumText: {fileID: 6467251191553420251, guid: 9b37289f93ea76745ab2cefb79a93e3c, type: 3}
   injuryNumTextSummon: {fileID: 6467251191553420251, guid: 71b4c570c9e403d429846b71878a20c4, type: 3}
@@ -1358,7 +1358,7 @@ MonoBehaviour:
   nextEndKeyTime: 0
   curKeyNum: 0
   attackType: 0
-  attackInterval: 6
+  attackInterval: 1
   curDamage: 0
   canHitFly: 1
   attackInfo:
@@ -1552,11 +1552,11 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   owner: {fileID: 1986582536140952583}
-  targetRiseHeight: 9
-  maxRiseHeight: 15
+  targetRiseHeight: 10
+  maxRiseHeight: 16
   upHeight: 3
   dashSpeed: 70
-  riseSpeed: 20
+  riseSpeed: 22
   breakDuration: 3.333
   dashDirection: {x: 0, y: -1, z: 0}
   riseDirection: {x: 0, y: 1, z: 0}

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

@@ -12,7 +12,8 @@ public class chargeDownward : MonoBehaviour
     private Rigidbody rb;
 
     [Header("移动参数")]
-    [LabelText("目标上升高度")] 
+    [LabelText("目标上升高度")]
+    private float Height;
     public float targetRiseHeight = 8f;
     public float maxRiseHeight = 16f;
     public float upHeight = 4f;
@@ -58,6 +59,7 @@ public class chargeDownward : MonoBehaviour
 
     void Awake()
     {
+        Height = targetRiseHeight;
         attackController = GetComponent<AttackController>();
         rb = GetComponent<Rigidbody>();
     }
@@ -145,8 +147,10 @@ public class chargeDownward : MonoBehaviour
         {
             if (targetRiseHeight < maxRiseHeight)
             {
-                owner.flyHeight = targetRiseHeight;
                 targetRiseHeight += upHeight;
+                owner.flyHeight = targetRiseHeight;
+                dashSpeed *= targetRiseHeight/Height;
+                riseSpeed *= 1+(targetRiseHeight / Height-1)/2f;
             }
             owner.ani.speed = 3.33f / breakDuration;
             owner.ani.Play("attack_fall", 0, 0);
@@ -186,12 +190,12 @@ public class chargeDownward : MonoBehaviour
 
         float heightDifference = Mathf.Abs(transform.position.y - targetRiseHeight);
 
-        if (heightDifference < 0.3f)
+        if (heightDifference < 1f)
         {
             IsRising = false;
             canDash = true;
             currentState = MovementState.Idle;
-            owner.ChangeState(CharacterState.Rise);
+            owner.ChangeState(CharacterState.Idle);
             foot.GetComponent<Foot>().trigGroundList.Clear();
             foot.SetActive(true);
             return;