Esempio n. 1
0
    private void InitGovernments () {
      Governments = new List<Government> ();

      ConfigNode GovConfig = ConfigNode.Load ("GameData/StateFunding/data/governments.settings");
      ConfigNode[] GovItems = GovConfig.GetNode ("Governments").GetNodes ();
      for (var i = 0; i < GovItems.Length; i++) {
        ConfigNode GovItem = GovItems [i];
        Government Gov = new Government ();

        Gov.name = GovItem.GetValue ("name");
        Gov.longName = GovItem.GetValue ("longName");
        Gov.poModifier = float.Parse(GovItem.GetValue ("poModifier"));
        Gov.poPenaltyModifier = float.Parse(GovItem.GetValue ("poPenaltyModifier"));
        Gov.scModifier = float.Parse (GovItem.GetValue ("scModifier"));
        Gov.scPenaltyModifier = float.Parse (GovItem.GetValue ("scPenaltyModifier"));
        Gov.startingPO = int.Parse (GovItem.GetValue ("startingPO"));
        Gov.startingSC = int.Parse (GovItem.GetValue ("startingSC"));
        Gov.budget = float.Parse (GovItem.GetValue ("budget"));
        Gov.gdp = int.Parse (GovItem.GetValue ("gdp"));
        Gov.description = GovItem.GetValue ("description");

        Governments.Add (Gov);

        Debug.Log ("Loaded Government: " + GovItem.GetValue("name"));
      }

      Debug.Log ("Initialized Governments");
    }
 public ViewGovernmentButton (Government Gov, Action <Government>callback) {
   this.Gov = Gov;
   this.callback = callback;
 }
 private void SelectGovernment(Government Gov)
 {
     SelectedGovernment = Gov;
       GovernmentDescription.label = Gov.description;
       GovernmentGameplayDescription.label = Gov.GetGameplayDescription();
       Confirm.text = "Select " + Gov.name;
 }
Esempio n. 4
0
 public ViewGovernmentButton(Government Gov, Action <Government> callback)
 {
     this.Gov      = Gov;
     this.callback = callback;
 }