|
@@ -13,14 +13,16 @@ public class Demonic : MoveCharacter
|
|
|
public bool canFly = false;
|
|
public bool canFly = false;
|
|
|
public int sortingOrder = 0;
|
|
public int sortingOrder = 0;
|
|
|
|
|
|
|
|
|
|
+ public int playerID;
|
|
|
|
|
+
|
|
|
private void Awake()
|
|
private void Awake()
|
|
|
{
|
|
{
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void OnDisable()
|
|
private void OnDisable()
|
|
|
{
|
|
{
|
|
|
- PlayersInput.instance[0].OnDemonicRecycle(this);
|
|
|
|
|
|
|
+ PlayersInput.instance[playerID].OnDemonicRecycle(this);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public override void FixedUpdate()
|
|
public override void FixedUpdate()
|
|
@@ -426,7 +428,7 @@ public class Demonic : MoveCharacter
|
|
|
dieKeepTime = totalDieKeepTime;
|
|
dieKeepTime = totalDieKeepTime;
|
|
|
//接尸体存入动效
|
|
//接尸体存入动效
|
|
|
//友方死亡后计入尸体
|
|
//友方死亡后计入尸体
|
|
|
- PlayersInput.instance[0].corpses++;
|
|
|
|
|
|
|
+ PlayersInput.instance[playerID].corpses++;
|
|
|
//print(PlayersInput.instance[0].corpses);
|
|
//print(PlayersInput.instance[0].corpses);
|
|
|
break;
|
|
break;
|
|
|
case CharacterState.Weak:
|
|
case CharacterState.Weak:
|
|
@@ -446,7 +448,7 @@ public class Demonic : MoveCharacter
|
|
|
{
|
|
{
|
|
|
base.Attack1();
|
|
base.Attack1();
|
|
|
Vector3 moveDir;
|
|
Vector3 moveDir;
|
|
|
- if (PlayersInput.instance[0].bodyTrans.localScale.x > 0)
|
|
|
|
|
|
|
+ if (PlayersInput.instance[playerID].bodyTrans.localScale.x > 0)
|
|
|
{
|
|
{
|
|
|
moveDir = Vector3.left;
|
|
moveDir = Vector3.left;
|
|
|
}
|
|
}
|