Example #1
0
 public void GenerateWorld(bool GenerateWhileInPlayMode, bool LoadCostField)
 {
     if (GenerateWhileInPlayMode)
     {
         GetComponent <SaveLoad>().LoadLevel();
         worldData.GenerateWorld(this, GenerateWhileInPlayMode, LoadCostField);
         worldData.Setup();
     }
     else
     {
         if (LoadCostField)
         {
             GetComponent <SaveLoad>().LoadLevel();
             worldData.GenerateWorld(this, GenerateWhileInPlayMode, LoadCostField);
         }
         else
         {
             worldData.costFields.Clear();
             worldData.GenerateWorld(this, GenerateWhileInPlayMode, LoadCostField);
         }
     }
 }
Example #2
0
 public void GenerateWorld(bool generateWhileInPlayMode, bool loadCostField)
 {
     if (generateWhileInPlayMode)
     {
         GetComponent <SaveLoad>().LoadLevel();
         worldData.GenerateWorld(this, true, loadCostField);
         worldData.Setup();
     }
     else
     {
         if (loadCostField)
         {
             GetComponent <SaveLoad>().LoadLevel();
             worldData.GenerateWorld(this, false, true);
         }
         else
         {
             worldData.CostFields.Clear();
             worldData.GenerateWorld(this, false, false);
         }
     }
 }