|
|
@@ -31,15 +31,6 @@ public class PlayerController : MoveCharacter
|
|
|
public bool endTranSummon; //是否在结束变身后召唤英灵
|
|
|
public Animator aniCollider;
|
|
|
|
|
|
- [Header("变身英灵")]
|
|
|
- public bool isUltimate; //英灵释放大招
|
|
|
- public bool keyTransfigurateRelease; //松开英灵释放大招键
|
|
|
- public List<GameObject> changePrefabs;
|
|
|
- public int[] needCorpses;
|
|
|
- private GameObject spiritObj; //当前变身的对象
|
|
|
- public int endChange = 0; //结束变身后召唤的英灵
|
|
|
- public Vector2 rightDir;
|
|
|
-
|
|
|
[Header("玩家组件")]
|
|
|
public UIHP uiMp;
|
|
|
private Spirits spirits;
|
|
|
@@ -242,17 +233,6 @@ public class PlayerController : MoveCharacter
|
|
|
[HideInInspector]
|
|
|
public bool isKeepBtnRush;
|
|
|
|
|
|
-
|
|
|
- public bool btnTransfiguratePress
|
|
|
- {
|
|
|
- get
|
|
|
- {
|
|
|
- //return Input.GetKeyDown(KeyCode.L) || isClickBtnEast;
|
|
|
- return isClickBtnTransfigurate;
|
|
|
- }
|
|
|
- }
|
|
|
- [HideInInspector]
|
|
|
- public bool isClickBtnTransfigurate;
|
|
|
public bool btnEastPress
|
|
|
{
|
|
|
get
|
|
|
@@ -498,11 +478,6 @@ public class PlayerController : MoveCharacter
|
|
|
portalsController.rbs.Remove(rb);
|
|
|
}
|
|
|
}
|
|
|
- if (rightDir.x < -0.5 || rightDir.x > 0.5)
|
|
|
- {
|
|
|
- ChangeSpirit();
|
|
|
- }
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -616,31 +591,6 @@ public class PlayerController : MoveCharacter
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //选英灵(手柄右摇杆,小键盘左右)
|
|
|
- void OnChooseSpirit_LR(InputValue value)
|
|
|
- {
|
|
|
- rightDir = value.Get<Vector2>();
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- //召唤英灵
|
|
|
- void OnTransfigurate()
|
|
|
- {
|
|
|
- if (!keyTransfigurateRelease && !isFloat && canMove && !isBaseBtnOut)
|
|
|
- {
|
|
|
- isClickBtnTransfigurate = true;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- //松开变身英灵键
|
|
|
- void OnTransfigurateUp()
|
|
|
- {
|
|
|
- if (!isBaseBtnOut)
|
|
|
- {
|
|
|
- keyTransfigurateRelease = true;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
public void Jump()
|
|
|
{
|
|
|
SetUpSpeed(jumpSpeed);
|
|
|
@@ -665,13 +615,9 @@ public class PlayerController : MoveCharacter
|
|
|
|
|
|
public bool CheckSummon()
|
|
|
{
|
|
|
- if (btnTransfiguratePress)
|
|
|
+ if (restSummonTime > 0)
|
|
|
{
|
|
|
- if (spirits.ultimateTimes[spirits.nowSpirit] > 0)
|
|
|
- {
|
|
|
- Summon((int)spirits.ownSpirits[spirits.nowSpirit] + 3);
|
|
|
- return true;
|
|
|
- }
|
|
|
+ return false;
|
|
|
}
|
|
|
if (state != CharacterState.Conduct && nowConductButton != -1 && conductTime > totalCacheSummonTime)
|
|
|
{
|
|
|
@@ -1022,12 +968,13 @@ public class PlayerController : MoveCharacter
|
|
|
// return true;
|
|
|
// }
|
|
|
//}
|
|
|
- if (excludeState != CharacterState.Summon)
|
|
|
+ if (CheckSummon())
|
|
|
{
|
|
|
- if (CheckSummon())
|
|
|
+ if (excludeState == CharacterState.Summon)
|
|
|
{
|
|
|
- return true;
|
|
|
+ ani.Play("summon", 0, 0);
|
|
|
}
|
|
|
+ return true;
|
|
|
}
|
|
|
if ((btnRushPress || cacheRushTime > 0 || cacheRush) && mp >= rushCostMp)
|
|
|
{
|
|
|
@@ -1618,9 +1565,6 @@ public class PlayerController : MoveCharacter
|
|
|
isSpiritSummon1 = false;
|
|
|
isSpiritSummon2 = false;
|
|
|
isSpiritSummon3 = false;
|
|
|
- isClickBtnTransfigurate = false;
|
|
|
- keyTransfigurateRelease = false;
|
|
|
-
|
|
|
|
|
|
if (foot.TrigGround)
|
|
|
{
|
|
|
@@ -2136,49 +2080,4 @@ public class PlayerController : MoveCharacter
|
|
|
{
|
|
|
targetCharacter = searchTrigger.GetMinDisTarget(attackController.targetTypes, attackController.canHitFly);
|
|
|
}*/
|
|
|
-
|
|
|
- public void ChangeSpirit()
|
|
|
- {
|
|
|
- if ((playerId == 0 && SpiritSystem.canP1CardChange) || (playerId == 1 && SpiritSystem.canP2CardChange))
|
|
|
- {
|
|
|
- if (rightDir.x >= 0.5)
|
|
|
- {
|
|
|
-
|
|
|
- switch (playerId)
|
|
|
- {
|
|
|
- case 0:
|
|
|
- SpiritSystem.P1CardChangeTime = 0;
|
|
|
- SpiritSystem.canP1CardChange = false;
|
|
|
- SpiritSystem.isP1CardChangeR = true;
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- SpiritSystem.P2CardChangeTime = 0;
|
|
|
- SpiritSystem.canP2CardChange = false;
|
|
|
- SpiritSystem.isP2CardChangeR = true;
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- else if (rightDir.x <= -0.5)
|
|
|
- {
|
|
|
-
|
|
|
- switch (playerId)
|
|
|
- {
|
|
|
- case 0:
|
|
|
- SpiritSystem.P1CardChangeTime = 0;
|
|
|
- SpiritSystem.canP1CardChange = false;
|
|
|
- SpiritSystem.isP1CardChangeL = true;
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- SpiritSystem.P2CardChangeTime = 0;
|
|
|
- SpiritSystem.canP2CardChange = false;
|
|
|
- SpiritSystem.isP2CardChangeL = true;
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
}
|