|
@@ -71,7 +71,7 @@ public class PlayerController : MoveCharacter
|
|
|
public float cacheAttackTime; //无法攻击时按下攻击键不会攻击,手感不好,缓存几帧,在这几帧内落地会立即攻击;
|
|
public float cacheAttackTime; //无法攻击时按下攻击键不会攻击,手感不好,缓存几帧,在这几帧内落地会立即攻击;
|
|
|
public float totalCacheAttackTime = 0.1f;
|
|
public float totalCacheAttackTime = 0.1f;
|
|
|
[HideInInspector]
|
|
[HideInInspector]
|
|
|
- public float cachePullRopeTime;
|
|
|
|
|
|
|
+ public float cachePullRopeTime;
|
|
|
public float totalCachePullRopeTime = 0.1f;
|
|
public float totalCachePullRopeTime = 0.1f;
|
|
|
[HideInInspector]
|
|
[HideInInspector]
|
|
|
public float cacheSummonTime; //无法召唤时按下召唤键不会召唤,手感不好,缓存几帧,在这几帧内落地会立即召唤;
|
|
public float cacheSummonTime; //无法召唤时按下召唤键不会召唤,手感不好,缓存几帧,在这几帧内落地会立即召唤;
|
|
@@ -92,14 +92,14 @@ public class PlayerController : MoveCharacter
|
|
|
|
|
|
|
|
private int currentSpirit; //当前将要召唤的英灵种类
|
|
private int currentSpirit; //当前将要召唤的英灵种类
|
|
|
private Spirits spirits;
|
|
private Spirits spirits;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
public bool btnJumpPress
|
|
public bool btnJumpPress
|
|
|
{
|
|
{
|
|
|
get
|
|
get
|
|
|
{
|
|
{
|
|
|
//return Input.GetKeyDown(KeyCode.Space) || isClickBtnJump;
|
|
//return Input.GetKeyDown(KeyCode.Space) || isClickBtnJump;
|
|
|
- return isClickBtnJump;
|
|
|
|
|
|
|
+ return isClickBtnJump;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
[HideInInspector]
|
|
[HideInInspector]
|
|
@@ -139,7 +139,7 @@ public class PlayerController : MoveCharacter
|
|
|
get
|
|
get
|
|
|
{
|
|
{
|
|
|
//return Input.GetKeyDown(KeyCode.L) || isClickBtnEast;
|
|
//return Input.GetKeyDown(KeyCode.L) || isClickBtnEast;
|
|
|
- return isClickBtnEast;
|
|
|
|
|
|
|
+ return isClickBtnEast;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
[HideInInspector]
|
|
[HideInInspector]
|
|
@@ -179,7 +179,7 @@ public class PlayerController : MoveCharacter
|
|
|
get
|
|
get
|
|
|
{
|
|
{
|
|
|
//return Input.GetKey(KeyCode.I) || isKeepBtnNorth;
|
|
//return Input.GetKey(KeyCode.I) || isKeepBtnNorth;
|
|
|
- return isKeepBtnNorth;
|
|
|
|
|
|
|
+ return isKeepBtnNorth;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
[HideInInspector]
|
|
[HideInInspector]
|
|
@@ -227,19 +227,12 @@ public class PlayerController : MoveCharacter
|
|
|
PlayerInput playerInput = transform.GetComponent<PlayerInput>();
|
|
PlayerInput playerInput = transform.GetComponent<PlayerInput>();
|
|
|
spirits = GetComponent<Spirits>();
|
|
spirits = GetComponent<Spirits>();
|
|
|
playerId = playerInput.playerIndex;
|
|
playerId = playerInput.playerIndex;
|
|
|
- if (playerId == 0)
|
|
|
|
|
- {
|
|
|
|
|
- transform.position = new Vector3(142, 0, 0);
|
|
|
|
|
- skeletonMecanim.skeletonDataAsset = playerSpine[0];
|
|
|
|
|
- PlayersInput.instance[0] = this;
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- transform.position = new Vector3(146, 0, 0);
|
|
|
|
|
- skeletonMecanim.skeletonDataAsset = playerSpine[1];
|
|
|
|
|
- PlayersInput.instance[1] = this;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+ transform.position = new Vector3(142 + 4 * playerId, 0, 0);
|
|
|
|
|
+ playerRope.playerId = playerId;
|
|
|
|
|
+ PlayersInput.instance[playerId] = this;
|
|
|
|
|
+ skeletonMecanim.skeletonDataAsset = playerSpine[playerId];
|
|
|
|
|
+
|
|
|
if (!PlayersInput.instance[0])
|
|
if (!PlayersInput.instance[0])
|
|
|
{
|
|
{
|
|
|
PlayersInput.instance[0] = this;
|
|
PlayersInput.instance[0] = this;
|
|
@@ -290,7 +283,7 @@ public class PlayerController : MoveCharacter
|
|
|
isKeepBtnRush = true;
|
|
isKeepBtnRush = true;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
void OnSprintingPress()
|
|
void OnSprintingPress()
|
|
|
{
|
|
{
|