|
@ -5,6 +5,8 @@ using UnityEngine; |
|
|
public class Map : MonoBehaviour { |
|
|
public class Map : MonoBehaviour { |
|
|
|
|
|
|
|
|
GameObject LocalPlayer; |
|
|
GameObject LocalPlayer; |
|
|
|
|
|
List<GameObject> Players = new List<GameObject>(); |
|
|
|
|
|
|
|
|
public GameObject[] Tiles; |
|
|
public GameObject[] Tiles; |
|
|
public List<GameObject> Landmarks; |
|
|
public List<GameObject> Landmarks; |
|
|
|
|
|
|
|
@ -29,16 +31,21 @@ public class Map : MonoBehaviour { |
|
|
#region StartupFunctions
|
|
|
#region StartupFunctions
|
|
|
private void Start() |
|
|
private void Start() |
|
|
{ |
|
|
{ |
|
|
|
|
|
LocalPlayer = Multiplayer.PlayersManager.Instance.LocalPlayer; |
|
|
|
|
|
Players.Add(LocalPlayer); |
|
|
|
|
|
foreach (GameObject curPlayer in Multiplayer.PlayersManager.Instance.RemotePlayers.Values) |
|
|
|
|
|
{ |
|
|
|
|
|
Players.Add(curPlayer); |
|
|
|
|
|
} |
|
|
//GenerateMap();
|
|
|
//GenerateMap();
|
|
|
CreateDummys(); |
|
|
CreateDummys(); |
|
|
LocalPlayer = Multiplayer.PlayersManager.Instance.LocalPlayer; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//Create dummy players for the world wrapping
|
|
|
//Create dummy players for the world wrapping
|
|
|
void CreateDummys() |
|
|
void CreateDummys() |
|
|
{ |
|
|
{ |
|
|
List<GameObject> Players = new List<GameObject>(); |
|
|
|
|
|
|
|
|
|
|
|
foreach (GameObject Player in Players) |
|
|
foreach (GameObject Player in Players) |
|
|
{ |
|
|
{ |
|
|
Player PS = Player.GetComponent<Player>(); |
|
|
Player PS = Player.GetComponent<Player>(); |
|
|