2 Achegas 7be8653542 ... 6514392d2d

Autor SHA1 Mensaxe Data
  1243896040 6514392d2d Merge remote-tracking branch 'origin/master' hai 10 horas
  1243896040 fce7705296 风车手里剑忍者跳跃改成减速 hai 10 horas

+ 2 - 1
ActionTowerDefense/Assets/Resources/Prefab/ESpirits/ESpirits_Pinja.prefab

@@ -508,7 +508,7 @@ MonoBehaviour:
   attackHitResistance: 100
   jumpForce: 30
   jumpDir: {x: 0.5, y: 1, z: 0}
-  jumpHeight: 6
+  jumpTime: 0.5
   backDuration: {x: 1, y: 1.2}
   stopDuration: 2
   maxFlytime: {x: 3.5, y: 3.7}
@@ -1630,6 +1630,7 @@ MonoBehaviour:
   bulletNum: 3
   angleRange: 60
   timeInterval: 0.2
+  cameraController: {fileID: 0}
   backDuration: 0
   stopDuration: 0
   maxFlytime: 0

+ 6 - 3
ActionTowerDefense/Assets/Scripts/Spirits/ESpirits_Pinja.cs

@@ -14,7 +14,7 @@ public class ESpirits_Pinja : Enemy
     [LabelText("攻击时抗击打值")] public int attackHitResistance;
     [LabelText("跳跃的力")] public float jumpForce;
     [LabelText("跳跃方向")] public Vector3 jumpDir;
-    [LabelText("跳跃高度")] public float jumpHeight;
+    [LabelText("跳跃时间")] public float jumpTime;
     [LabelText("回旋镖移动时间")] public Vector2 backDuration;
     [LabelText("回旋镖停留时间")] public float stopDuration;
     [LabelText("回旋镖最大飞行时间")] public Vector2 maxFlytime;
@@ -25,6 +25,7 @@ public class ESpirits_Pinja : Enemy
     private int originalHitResistance;
     public Vector3 moveDir;
     private int targetBullet;
+    private float riseTimer;
     public override void Init()
     {
         base.Init();
@@ -131,13 +132,14 @@ public class ESpirits_Pinja : Enemy
                 ChooseLockingTarget();
                 break;
             case CharacterState.Rise:
-                Vector3 velocity = jumpDir * jumpForce * moveSpeedScale;
+                riseTimer += Time.deltaTime;
+                Vector3 velocity = Vector3.Lerp(jumpDir * jumpForce * moveSpeedScale, Vector3.zero, riseTimer/jumpTime);
                 if (bodyTrans.localScale.x < 0)
                 {
                     velocity.x = -velocity.x;
                 }
                 rb.velocity = velocity;
-                if (transform.position.y >= jumpHeight)
+                if (riseTimer >= jumpTime)
                 {
                     boomerangWeaponController.targetPos = player.transform.position + Vector3.one;
                     boomerangWeaponController.hasTarget = true;
@@ -196,6 +198,7 @@ public class ESpirits_Pinja : Enemy
                         Turn();
                     }
                 }
+                riseTimer = 0;
                 break;
             case CharacterState.SpecialStatus_BlowUp:
             case CharacterState.SpecialStatus_ShotDown: