Beispiel #1
0
    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;
    }
Beispiel #2
0
 public void saveCurrentGridToJSON(string filename)
 {
     WorldJsonUtility.saveMapAsJSON(worldMap, filename);
     currentAction = action.None;
     savePrompt.SetActive(false);
 }