Browse Source

Maybe fixed wrapping

master
JoshuaReason 5 years ago
parent
commit
92cc278d9c
2 changed files with 6 additions and 10 deletions
  1. +0
    -4
      Assets/Scenes/MainScene.unity
  2. +6
    -6
      Assets/Scipts/Map.cs

+ 0
- 4
Assets/Scenes/MainScene.unity View File

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

+ 6
- 6
Assets/Scipts/Map.cs View File

@ -7,7 +7,7 @@ public class Map : MonoBehaviour
GameObject LocalPlayer;
List<GameObject> Players = new List<GameObject>();
public GameObject[] Tiles;
public List<GameObject> Landmarks;
@ -16,10 +16,10 @@ public class Map : MonoBehaviour
public List<GameObject> 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

Loading…
Cancel
Save