コード例 #1
0
 public static DetailsSaveAndLoadManager getInstance()
 {
     if (instance == null)
     {
         instance = new DetailsSaveAndLoadManager();
     }
     return(instance);
 }
コード例 #2
0
    public void Load()
    {
        Tabs tabs = GameObject.Find("Phases").GetComponent <Tabs>();

        tabs.activateAll();

        EnviromentSaveAndLoadManager.getInstance().loadMap();
        DetailsSaveAndLoadManager.getInstance().loadDetails();
        TerraformSaveAndLoadManager.getInstance().loadMap();

        ChunkRenderer.renderAll();

        tabs.returnState();
    }
コード例 #3
0
    public void Save()
    {
        Tabs tabs = GameObject.Find("Phases").GetComponent <Tabs>();

        tabs.activateAll();

        ChunkMap chunkMap = GameObject.Find("EnviromentController").GetComponent <ChunkMap>();

        EnviromentSaveAndLoadManager.getInstance().saveMap(chunkMap.blockGrid);

        Dictionary <GameObject, GameObjectNotation> details = GameObject.Find("DetailsController").GetComponent <DropPrefab>().details;

        DetailsSaveAndLoadManager.getInstance().saveDetails(details);

        Dictionary <Vector2, float> terraforms = GameObject.Find("TerraformController").GetComponent <DropTerraform>().terraforms;

        TerraformSaveAndLoadManager.getInstance().saveMap(terraforms);

        tabs.returnState();
    }