Browse Source

Fixed bug that was misplacing the spawning area due to startX being changed between games in MapManager.asset.

master
s3607057 (Angus Niven) 5 years ago
parent
commit
abd9926b80
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      Assets/Scripts/Map Generation/MapManager.cs

+ 3
- 1
Assets/Scripts/Map Generation/MapManager.cs View File

@ -20,7 +20,8 @@ public class MapManager : ScriptableObject
public List<MapSection> activeSections; //The list of sections that have been placed on the map (and not removed)
MapSection lastSection; //Which map-section was most recently added?
float startX = -16.0f; //The x-position of the current start of the track
float startX; //The x-position of the current start of the track
float startXinit = -16.0f;
float endX; //The x-position of the current end of the track
int totalSections; //How many sections have been added? Including ones that have been deleted
@ -44,6 +45,7 @@ public class MapManager : ScriptableObject
public void init()
{
sections = new List<MapSection>();
startX = startXinit;
endX = startX;
totalSections = 0;

Loading…
Cancel
Save