Exemplo n.º 1
0
    public void loadSave () {
      if (GameInstance == null) {
        if ((GameInstance = InstanceConf.loadInstance ()) == null) {
          InstanceConf.createInstance ((Instance Inst) => {
            GameInstance = Inst;
            ReviewMgr.CompleteReview ();
            InstanceConf.saveInstance (Inst);
          });
        }

        Debug.Log ("StateFunding Save Loaded");
      }
    }
Exemplo n.º 2
0
    public Instance loadInstance () {
      ConfigNode CnfNode = ConfigNode.Load (saveFilePath);
      if (CnfNode == null) {
        return null;
      } else {
        Instance Inst = new Instance ();
        ConfigNode.LoadObjectFromConfig (Inst, CnfNode);

        for (int i = 0; i < StateFundingGlobal.fetch.Governments.ToArray ().Length; i++) {
          Government Gov = StateFundingGlobal.fetch.Governments.ToArray () [i];
          if (Gov.name == Inst.govName) {
            Inst.Gov = Gov;
          }
        }

        return Inst;
      }
    }
Exemplo n.º 3
0
 public void unload()
 {
     ViewManager.removeAll ();
       GameInstance = null;
 }
Exemplo n.º 4
0
 public void saveInstance (Instance Inst) {
   ConfigNode CnfNode = ConfigNode.CreateConfigFromObject (Inst);
   CnfNode.Save (saveFilePath);
 }
 private void OnConfirm () {
   Instance Inst = new Instance ();
   Inst.Gov = SelectedGovernment;
   Inst.govName = SelectedGovernment.name;
   Inst.po = (int)SelectedGovernment.startingPO;
   Inst.sc = (int)SelectedGovernment.startingSC;
   ViewManager.removeView (this);
   OnCreateCallback (Inst);
 }