|
@@ -90,6 +90,10 @@ public class PlayerController : MoveCharacter
|
|
|
public float attackMoveSpeed = 5f;
|
|
public float attackMoveSpeed = 5f;
|
|
|
public Vector3 rushDir;
|
|
public Vector3 rushDir;
|
|
|
|
|
|
|
|
|
|
+ private int currentSpirit; //当前将要召唤的英灵种类
|
|
|
|
|
+ private Spirits spirits;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
public bool btnJumpPress
|
|
public bool btnJumpPress
|
|
|
{
|
|
{
|
|
|
get
|
|
get
|
|
@@ -160,6 +164,16 @@ public class PlayerController : MoveCharacter
|
|
|
}
|
|
}
|
|
|
[HideInInspector]
|
|
[HideInInspector]
|
|
|
public bool isClickBtnNorth;
|
|
public bool isClickBtnNorth;
|
|
|
|
|
+ public bool btnSpiritSummon
|
|
|
|
|
+ {
|
|
|
|
|
+ get
|
|
|
|
|
+ {
|
|
|
|
|
+ //return Input.GetKeyDown(KeyCode.I) || isClickBtnNorth;
|
|
|
|
|
+ return isSpiritSummon;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ [HideInInspector]
|
|
|
|
|
+ public bool isSpiritSummon;
|
|
|
public bool btnNorthKeep
|
|
public bool btnNorthKeep
|
|
|
{
|
|
{
|
|
|
get
|
|
get
|
|
@@ -211,6 +225,7 @@ public class PlayerController : MoveCharacter
|
|
|
private void Awake()
|
|
private void Awake()
|
|
|
{
|
|
{
|
|
|
PlayerInput playerInput = transform.GetComponent<PlayerInput>();
|
|
PlayerInput playerInput = transform.GetComponent<PlayerInput>();
|
|
|
|
|
+ spirits = GetComponent<Spirits>();
|
|
|
playerId = playerInput.playerIndex;
|
|
playerId = playerInput.playerIndex;
|
|
|
if (playerId == 0)
|
|
if (playerId == 0)
|
|
|
{
|
|
{
|
|
@@ -311,9 +326,9 @@ public class PlayerController : MoveCharacter
|
|
|
{
|
|
{
|
|
|
isClickBtnEast = true;
|
|
isClickBtnEast = true;
|
|
|
}
|
|
}
|
|
|
- void OnSummonFloat()
|
|
|
|
|
- {
|
|
|
|
|
-
|
|
|
|
|
|
|
+ void OnSummonSpirit()
|
|
|
|
|
+ {
|
|
|
|
|
+ isSpiritSummon = true;
|
|
|
}
|
|
}
|
|
|
public void Jump()
|
|
public void Jump()
|
|
|
{
|
|
{
|
|
@@ -359,6 +374,11 @@ public class PlayerController : MoveCharacter
|
|
|
Summon(2);
|
|
Summon(2);
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
+ if (isSpiritSummon)
|
|
|
|
|
+ {
|
|
|
|
|
+ Summon((int)spirits.currentSpirit + 3);
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -489,6 +509,11 @@ public class PlayerController : MoveCharacter
|
|
|
cacheSummonTime = totalCacheSummonTime;
|
|
cacheSummonTime = totalCacheSummonTime;
|
|
|
cacheSummonId = 2;
|
|
cacheSummonId = 2;
|
|
|
}
|
|
}
|
|
|
|
|
+ if (btnSpiritSummon)
|
|
|
|
|
+ {
|
|
|
|
|
+ cacheSummonTime = totalCacheSummonTime;
|
|
|
|
|
+ cacheSummonId = (int)spirits.currentSpirit + 3;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public override void OnState()
|
|
public override void OnState()
|
|
@@ -906,6 +931,7 @@ public class PlayerController : MoveCharacter
|
|
|
isClickBtnEast = false;
|
|
isClickBtnEast = false;
|
|
|
isClickBtnNorth = false;
|
|
isClickBtnNorth = false;
|
|
|
isClickBtnWest = false;
|
|
isClickBtnWest = false;
|
|
|
|
|
+ isSpiritSummon = false;
|
|
|
|
|
|
|
|
if (foot.TrigGround)
|
|
if (foot.TrigGround)
|
|
|
{
|
|
{
|