|
@@ -164,6 +164,7 @@ public class PlayerController : MoveCharacter
|
|
|
public ConductReadyTip conductReadyTip; //指挥技就绪
|
|
public ConductReadyTip conductReadyTip; //指挥技就绪
|
|
|
private bool isReadyConduct;
|
|
private bool isReadyConduct;
|
|
|
public GameObject photosphereObj;
|
|
public GameObject photosphereObj;
|
|
|
|
|
+ public int[] demonicNum; //JKL召唤的使魔的数量
|
|
|
|
|
|
|
|
|
|
|
|
|
public enum ConductSkills
|
|
public enum ConductSkills
|
|
@@ -397,6 +398,10 @@ public class PlayerController : MoveCharacter
|
|
|
}
|
|
}
|
|
|
skeletonMecanim.skeletonDataAsset = playerSpine[playerId];
|
|
skeletonMecanim.skeletonDataAsset = playerSpine[playerId];
|
|
|
demonicDic = new Dictionary<int, List<Demonic>>();
|
|
demonicDic = new Dictionary<int, List<Demonic>>();
|
|
|
|
|
+ for(int i = 0; i < 3; i++)
|
|
|
|
|
+ {
|
|
|
|
|
+ demonicDic.Add(i, new List<Demonic>());
|
|
|
|
|
+ }
|
|
|
Init();
|
|
Init();
|
|
|
spiritSystem = GameObject.Find("SpiritSystem").GetComponent<SpiritSystem>();
|
|
spiritSystem = GameObject.Find("SpiritSystem").GetComponent<SpiritSystem>();
|
|
|
}
|
|
}
|
|
@@ -659,20 +664,35 @@ public class PlayerController : MoveCharacter
|
|
|
{
|
|
{
|
|
|
if (mp >= conductCostMp[cacheConductId])
|
|
if (mp >= conductCostMp[cacheConductId])
|
|
|
{
|
|
{
|
|
|
- mp -= conductCostMp[cacheConductId];
|
|
|
|
|
- uiMp.Show(mp, totalMp);
|
|
|
|
|
|
|
+ bool costMp = true; //如果指挥技能要消耗的使魔数量为0就改成false
|
|
|
switch (conductSkills[cacheConductId])
|
|
switch (conductSkills[cacheConductId])
|
|
|
{
|
|
{
|
|
|
case ConductSkills.Photosphere:
|
|
case ConductSkills.Photosphere:
|
|
|
- conductCanRelease[cacheConductId] = false;
|
|
|
|
|
- GameObject obj = GameObject.Instantiate(photosphereObj,transform);
|
|
|
|
|
- obj.transform.position = transform.position + Vector3.up;
|
|
|
|
|
- Photosphere photosphere = obj.GetComponent<Photosphere>();
|
|
|
|
|
- photosphere.owner = this;
|
|
|
|
|
- photosphere.conductId = cacheConductId;
|
|
|
|
|
-
|
|
|
|
|
|
|
+ if(demonicDic[1].Count > 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ conductCanRelease[cacheConductId] = false;
|
|
|
|
|
+ GameObject obj = GameObject.Instantiate(photosphereObj, transform);
|
|
|
|
|
+ obj.transform.position = transform.position + Vector3.up;
|
|
|
|
|
+ Photosphere photosphere = obj.GetComponent<Photosphere>();
|
|
|
|
|
+ photosphere.owner = this;
|
|
|
|
|
+ photosphere.conductId = cacheConductId;
|
|
|
|
|
+ photosphere.hp = demonicDic[1].Count * 1000;
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ costMp = false;
|
|
|
|
|
+ }
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
|
|
+ if (costMp)
|
|
|
|
|
+ {
|
|
|
|
|
+ mp -= conductCostMp[cacheConductId];
|
|
|
|
|
+ uiMp.Show(mp, totalMp);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ print("使魔不足");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|