|
|
@@ -65,9 +65,11 @@ public class PlayerController : MoveCharacter
|
|
|
[Header("蓝耗")]
|
|
|
public float mp;
|
|
|
public float totalMp;
|
|
|
+ public float totalMp_2Players; //双人模式下总蓝量
|
|
|
public bool isMpRepel = true;
|
|
|
public bool isRapedReply;
|
|
|
- public float mpReplySpeed = 1;
|
|
|
+ public float mpReplySpeed;
|
|
|
+ public float mpReplySpeed_2Players; //双人模式下蓝量回复速度
|
|
|
public float rapidReplySpeed;
|
|
|
public float lostMp;
|
|
|
private float addMp = 10;
|
|
|
@@ -295,6 +297,21 @@ public class PlayerController : MoveCharacter
|
|
|
if (PlayersInput.instance[1] == PlayersInput.instance[0])
|
|
|
{
|
|
|
PlayersInput.instance[1] = this;
|
|
|
+ PlayerController p1 = PlayersInput.instance[0];
|
|
|
+ mpReplySpeed = mpReplySpeed_2Players;
|
|
|
+ p1.mpReplySpeed = mpReplySpeed_2Players;
|
|
|
+ totalMp = totalMp_2Players;
|
|
|
+ p1.totalMp = totalMp_2Players;
|
|
|
+ if(mp > totalMp)
|
|
|
+ {
|
|
|
+ mp = totalMp;
|
|
|
+ }
|
|
|
+ if(p1.mp > totalMp)
|
|
|
+ {
|
|
|
+ p1.mp = totalMp;
|
|
|
+ }
|
|
|
+ uiMp.Show(mp, totalMp);
|
|
|
+ p1.uiMp.Show(p1.mp, totalMp);
|
|
|
}
|
|
|
PlayersInput.instance[playerId] = this;
|
|
|
skeletonMecanim.skeletonDataAsset = playerSpine[playerId];
|