|
@ -7,22 +7,26 @@ public class CharacterMovement : MonoBehaviour { |
|
|
public float Speed; |
|
|
public float Speed; |
|
|
GameObject localPlayer; |
|
|
GameObject localPlayer; |
|
|
public List<GameObject> Players = new List<GameObject>(); |
|
|
public List<GameObject> Players = new List<GameObject>(); |
|
|
public List<bool> Nearby = new List<bool>(); |
|
|
|
|
|
|
|
|
List<bool> Nearby = new List<bool>(); |
|
|
|
|
|
|
|
|
public float DistanceToWin; |
|
|
public float DistanceToWin; |
|
|
|
|
|
|
|
|
Camera cam; |
|
|
Camera cam; |
|
|
|
|
|
|
|
|
public AudioSource Cheer; |
|
|
public AudioSource Cheer; |
|
|
|
|
|
|
|
|
private void Start() |
|
|
private void Start() |
|
|
{ |
|
|
{ |
|
|
localPlayer = Multiplayer.PlayersManager.Instance.LocalPlayer; |
|
|
localPlayer = Multiplayer.PlayersManager.Instance.LocalPlayer; |
|
|
Players.Add(localPlayer); |
|
|
Players.Add(localPlayer); |
|
|
|
|
|
Nearby.Add(false); |
|
|
foreach (GameObject curPlayer in Multiplayer.PlayersManager.Instance.RemotePlayers.Values) |
|
|
foreach (GameObject curPlayer in Multiplayer.PlayersManager.Instance.RemotePlayers.Values) |
|
|
{ |
|
|
{ |
|
|
Players.Add(curPlayer); |
|
|
Players.Add(curPlayer); |
|
|
|
|
|
Nearby.Add(false); |
|
|
} |
|
|
} |
|
|
cam = localPlayer.GetComponentInChildren<Camera>(); |
|
|
cam = localPlayer.GetComponentInChildren<Camera>(); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public bool CheckNearby() |
|
|
public bool CheckNearby() |
|
|