Skip to content

Commit

Permalink
Fix status menu not rendering JSON sectors
Browse files Browse the repository at this point in the history
  • Loading branch information
rudderbucky committed Apr 8, 2019
1 parent fc9a956 commit d96a818
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Assets/Scripts/Game Object Definitions/SectorManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ private void Awake()

private void Update()
{
if(jsonMode) player.SetIsInteracting(true);
if(!jsonMode && player && (current == null || !current.bounds.contains(player.transform.position)))
{
// load sector
Expand Down Expand Up @@ -112,14 +113,18 @@ public void TryGettingJSON() {
curSect.platform = plat;
current = curSect;
sectors = new List<Sector>();
sectors.Add(curSect);
Debug.Log("Success! File loaded from " + path);
jsonMode = false;
player.SetIsInteracting(false);
loadSector();
return;
} catch(System.Exception e) {
Debug.Log(e);
}
}
jsonMode = false;
player.SetIsInteracting(false);
loadSector();
}
private void Start()
Expand Down

0 comments on commit d96a818

Please sign in to comment.