|
|
@@ -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:
|