|
|
@@ -6,10 +6,11 @@ using UnityEngine;
|
|
|
public class ESpirits_KiteNinja : Enemy
|
|
|
{
|
|
|
[Space(30)]
|
|
|
- [Title("ESpirits_Assassin属性")]
|
|
|
+ [Title("ESpirits_KiteNinja属性")]
|
|
|
[Tooltip("X为锁定玩家次数Y为锁定肉盾次数")]
|
|
|
[LabelText("锁敌逻辑")] public Vector2 lockingLogic;
|
|
|
- [LabelText("复活次数")] public int revivesNum;
|
|
|
+ [LabelText("复活次数")] public int totalRevivesNum;
|
|
|
+ public int revivesNum;
|
|
|
[LabelText("复活范围")] public Vector2 revivesPos;
|
|
|
[LabelText("逃跑距离")] public float fleeDistance;
|
|
|
[LabelText("逃跑速度比例")] public Vector2 fleeSpeedRate;
|
|
|
@@ -22,6 +23,10 @@ public class ESpirits_KiteNinja : Enemy
|
|
|
public override void Init()
|
|
|
{
|
|
|
base.Init();
|
|
|
+ if(revivesNum == 0)
|
|
|
+ {
|
|
|
+ revivesNum = totalRevivesNum;
|
|
|
+ }
|
|
|
rb.constraints = RigidbodyConstraints.FreezePositionZ | RigidbodyConstraints.FreezeRotation;
|
|
|
targetIsPlayer = true;
|
|
|
lockingNum = 0;
|
|
|
@@ -36,6 +41,12 @@ public class ESpirits_KiteNinja : Enemy
|
|
|
switch (state)
|
|
|
{
|
|
|
case CharacterState.Die:
|
|
|
+ if(GameManager.instance.gameType == GameType.GameEnd)
|
|
|
+ {
|
|
|
+ revivesNum = totalRevivesNum;
|
|
|
+ gameObject.SetActive(false);
|
|
|
+ return;
|
|
|
+ }
|
|
|
revivesNum--;
|
|
|
if (revivesNum < 0)
|
|
|
{
|