|
|
@@ -160,6 +160,7 @@ public class PlayerController : MoveCharacter
|
|
|
[Header("指挥相应时间")] [Tooltip("在此时间以外松手为指挥")] public float[] canConductTime;
|
|
|
[Header("指挥相应耗蓝")] [Tooltip("输入相应的技能耗蓝")] public float[] conductCostMp;
|
|
|
[Header("指挥技能")] [Tooltip("选择相应的指挥技能")] public ConductSkills[] conductSkills;
|
|
|
+ [Header("指挥技能否释放")] [Tooltip("针对前一次技能效果还没有结束,此次技能不能使用的情况")] public bool[] conductCanRelease;
|
|
|
public ConductReadyTip conductReadyTip; //指挥技就绪
|
|
|
private bool isReadyConduct;
|
|
|
public GameObject photosphereObj;
|
|
|
@@ -611,12 +612,6 @@ public class PlayerController : MoveCharacter
|
|
|
|
|
|
public bool CheckSummon()
|
|
|
{
|
|
|
- if (state!=CharacterState.Conduct && nowConductButton != -1 && conductTime >= 0)
|
|
|
- {
|
|
|
- CheckTurn();
|
|
|
- ChangeState(CharacterState.Conduct);
|
|
|
- return true;
|
|
|
- }
|
|
|
if (isBtnEastUp || isBtnWestUp || isBtnSouthUp)
|
|
|
{
|
|
|
if (cacheSummonTime >= 0 && conductTime <= totalCacheSummonTime)
|
|
|
@@ -627,16 +622,23 @@ public class PlayerController : MoveCharacter
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
+ if (state!=CharacterState.Conduct && nowConductButton != -1 && conductTime >= 0)
|
|
|
+ {
|
|
|
+ if (!conductCanRelease[nowConductButton])
|
|
|
+ {
|
|
|
+ cacheConductId = nowConductButton;
|
|
|
+ nowConductButton = -1;
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ CheckTurn();
|
|
|
+ ChangeState(CharacterState.Conduct);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
public bool CheckConduct()
|
|
|
{
|
|
|
- if(!isReadyConduct && conductTime >= canConductTime[nowConductButton])
|
|
|
- {
|
|
|
- conductReadyTip.Show();
|
|
|
- isReadyConduct = true;
|
|
|
- }
|
|
|
if (isBtnEastUp || isBtnWestUp || isBtnSouthUp)
|
|
|
{
|
|
|
if (isReadyConduct)
|
|
|
@@ -646,6 +648,12 @@ public class PlayerController : MoveCharacter
|
|
|
isReadyConduct = false;
|
|
|
return true;
|
|
|
}
|
|
|
+ if (!isReadyConduct && conductTime >= canConductTime[nowConductButton])
|
|
|
+ {
|
|
|
+ conductReadyTip.Show();
|
|
|
+ isReadyConduct = true;
|
|
|
+ }
|
|
|
+
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
@@ -658,9 +666,13 @@ public class PlayerController : MoveCharacter
|
|
|
switch (conductSkills[cacheConductId])
|
|
|
{
|
|
|
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;
|
|
|
+
|
|
|
break;
|
|
|
}
|
|
|
}
|