JoshuaReason 5 years ago
parent
commit
44fa641fde
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      Assets/Scipts/CharacterMovement.cs

+ 5
- 1
Assets/Scipts/CharacterMovement.cs View File

@ -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()

Loading…
Cancel
Save