public void loadLevel(string levelName) { //Destroy the world!! destroyCurrentWorld(); //Create the new one from WorldJsonUtility WorldJsonUtility.WorldJSONWrapper newMapWrapper = WorldJsonUtility.loadLevelData(worldMap, levelName); //Properly initialize it into the game worldMap.updateMapFromJsonWrapper(newMapWrapper); loadSelect.SetActive(false); currentAction = action.None; }
public void saveCurrentGridToJSON(string filename) { WorldJsonUtility.saveMapAsJSON(worldMap, filename); currentAction = action.None; savePrompt.SetActive(false); }