diff --git a/Assets/Scenes/MainScene.unity b/Assets/Scenes/MainScene.unity index 22d4499..89097f1 100644 --- a/Assets/Scenes/MainScene.unity +++ b/Assets/Scenes/MainScene.unity @@ -840,10 +840,6 @@ MonoBehaviour: TileSize: 100 MapDimensions: {x: 3, y: 3} Veggies: [] - minX: -80 - maxX: 80 - minZ: -80 - maxZ: 80 --- !u!114 &340012152 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Scipts/Map.cs b/Assets/Scipts/Map.cs index 9394682..abfe731 100644 --- a/Assets/Scipts/Map.cs +++ b/Assets/Scipts/Map.cs @@ -7,7 +7,7 @@ public class Map : MonoBehaviour GameObject LocalPlayer; List Players = new List(); - + public GameObject[] Tiles; public List Landmarks; @@ -16,10 +16,10 @@ public class Map : MonoBehaviour public List Veggies; //Minimum and maximum values for the map - public float minX; - public float maxX; - public float minZ; - public float maxZ; + public float minX { get { return (-MapDimensions.x * (TileSize / 2)); } } + public float maxX { get { return (MapDimensions.x * (TileSize / 2)); } } + public float minZ { get { return (-MapDimensions.y * (TileSize / 2)); } } + public float maxZ { get { return (-MapDimensions.y * (TileSize / 2)); } } #region StartupFunctions @@ -178,7 +178,7 @@ public class Map : MonoBehaviour Instantiate(Landmarks[rand], LP.transform.position, Quaternion.identity, tile.transform.parent); } } - + } #endregion