|
|
@@ -160,6 +160,7 @@ public class PlayerController : MoveCharacter
|
|
|
//怨气弹
|
|
|
public GameObject angryBulletObj;
|
|
|
[Header("怨气弹数量基数")] public int angryBulletNum;
|
|
|
+ [Header("士兵复活点位")] [ShowInInspector] public List<RebornSkill> rebornSkills = new List<RebornSkill>();
|
|
|
|
|
|
public bool btnJumpPress
|
|
|
{
|
|
|
@@ -1468,8 +1469,8 @@ public class PlayerController : MoveCharacter
|
|
|
|
|
|
public void Summon(int id)
|
|
|
{
|
|
|
- ChangeState(CharacterState.Summon);
|
|
|
- summonTime = totalSummonTime;
|
|
|
+ //ChangeState(CharacterState.Summon);
|
|
|
+ //summonTime = totalSummonTime;
|
|
|
Demonic dem = demonicPrefabs[id].GetComponent<Demonic>();
|
|
|
float costMp = dem.costMp;
|
|
|
for (int i = 0; i < 3; i++)
|
|
|
@@ -1482,16 +1483,76 @@ public class PlayerController : MoveCharacter
|
|
|
}
|
|
|
mp -= costMp;
|
|
|
uiMp.Show(mp, totalMp);
|
|
|
- for (int i = 0; i < nextSummonNum; i++)
|
|
|
+ StartCoroutine(SummonDemoic(id));
|
|
|
+ //for (int i = 0; i < nextSummonNum; i++)
|
|
|
+ //{
|
|
|
+ // Demonic demonic = CreateDemonic(id);
|
|
|
+ // if (demonic.canFly)
|
|
|
+ // {
|
|
|
+ // if (i > 0) demonic.transform.position += new Vector3(Random.Range(-2, 2), Random.Range(-2, 2), 0);
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // if (i > 0) demonic.transform.position += new Vector3(Random.Range(-2, 2), Random.Range(0f, 0.5f), 0);
|
|
|
+ // }
|
|
|
+
|
|
|
+ // int attackSummonId = nowAttackSummonID;
|
|
|
+
|
|
|
+ // if (lastSoldier != demonic.soldierType)
|
|
|
+ // {
|
|
|
+ // attackSummonId = 0;
|
|
|
+ // }
|
|
|
+ // demonic.attackController.attackSummonId = attackSummonId;
|
|
|
+ // onlySummonTime = demonic.attackController.summonTime[attackSummonId];
|
|
|
+ // invincibleTime = onlySummonTime + addSummonInvincibleTime;
|
|
|
+ // restSummonTime = onlySummonTime;
|
|
|
+ // demonic.Attack_summon();
|
|
|
+ // lastSoldier = demonic.soldierType;
|
|
|
+ // attackSummonId++;
|
|
|
+ // if (attackSummonId >= demonic.attackController.attackMethod_summon.Length)
|
|
|
+ // {
|
|
|
+ // attackSummonId = 0;
|
|
|
+ // AttackSummonChangeTime = 0;
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // AttackSummonChangeTime = AttackSummonChangeTotalTime;
|
|
|
+ // }
|
|
|
+ // nowAttackSummonID = attackSummonId;
|
|
|
+ // //id 3~6 为四个英灵
|
|
|
+ // if (id >= 3)
|
|
|
+ // {
|
|
|
+ // spirits.ultimateTimes[id - 3] -= spirits.summonCost;
|
|
|
+ // }
|
|
|
+ // spiritSystem.RefreshPlayerUI();
|
|
|
+ // if (isInSoulTower)
|
|
|
+ // {
|
|
|
+ // ls.AddDenomic(demonic);
|
|
|
+ // }
|
|
|
+ //}
|
|
|
+ //nextSummonNum = 1;
|
|
|
+ //GameUI.instance.summonNum.text = nextSummonNum.ToString();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ IEnumerator<WaitForSeconds> SummonDemoic(int id)
|
|
|
+ {
|
|
|
+ int count = 0;
|
|
|
+ int num = nextSummonNum;
|
|
|
+ nextSummonNum = 1;
|
|
|
+ GameUI.instance.summonNum.text = nextSummonNum.ToString();
|
|
|
+ while (count < num)
|
|
|
{
|
|
|
+ ChangeState(CharacterState.Summon);
|
|
|
+ summonTime = totalSummonTime;
|
|
|
Demonic demonic = CreateDemonic(id);
|
|
|
if (demonic.canFly)
|
|
|
{
|
|
|
- if (i > 0) demonic.transform.position += new Vector3(Random.Range(-2, 2), Random.Range(-2, 2), 0);
|
|
|
+ if (count > 0) demonic.transform.position += new Vector3(Random.Range(-2, 2), Random.Range(-2, 2), 0);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- if (i > 0) demonic.transform.position += new Vector3(Random.Range(-2, 2), Random.Range(-0.5f, 0.5f), 0);
|
|
|
+ if (count > 0) demonic.transform.position += new Vector3(Random.Range(-2, 2), Random.Range(0f, 0.5f), 0);
|
|
|
}
|
|
|
|
|
|
int attackSummonId = nowAttackSummonID;
|
|
|
@@ -1527,9 +1588,10 @@ public class PlayerController : MoveCharacter
|
|
|
{
|
|
|
ls.AddDenomic(demonic);
|
|
|
}
|
|
|
+ count++;
|
|
|
+ yield return new WaitForSeconds(0.1f);
|
|
|
}
|
|
|
- nextSummonNum = 1;
|
|
|
- GameUI.instance.summonNum.text = nextSummonNum.ToString();
|
|
|
+ yield return null;
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -1735,4 +1797,10 @@ public class PlayerController : MoveCharacter
|
|
|
}
|
|
|
GameUI.instance.HurtMask((hp *1f)/totalHp);
|
|
|
}
|
|
|
+
|
|
|
+ public void CheckReborn(Demonic demonic)
|
|
|
+ {
|
|
|
+ if (rebornSkills.Count == 0) return;
|
|
|
+ rebornSkills[0].Reborn(this, demonic.id);
|
|
|
+ }
|
|
|
}
|