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