Exemplo n.º 1
0
 public void addConfigClick()
 {
     if (Category.SelectedIndex == 2)
     {
         configStatus = tempConfigs.SetFractionsConfig();
         if (configStatus == null || tempConfigs.fractions.Count != mapObjects.castles.imagesList.Count + bitmap.Width / bitmap.Height)
         {
             configAdded = false;
         }
         else
         {
             configAdded = true;
         }
     }
     else
     {
         configStatus = tempConfigs.SetRuinsConfig();
         if (configStatus == null || tempConfigs.ruinsData.Count != mapObjects.ruins.Count + 1 ||
             tempConfigs.ruinsData[tempConfigs.ruinsData.Count - 1].sprites.Count != bitmap.Width / bitmap.Height)
         {
             configAdded = false;
         }
         else
         {
             SetName.Text = tempConfigs.ruinsData[tempConfigs.ruinsData.Count - 1].name;
             configAdded  = true;
         }
     }
     if (!configAdded)
     {
         configStatus = "Error, please retry";
     }
 }
Exemplo n.º 2
0
 public void changeConfigs()
 {
     configs.SetFractionsConfig();
     configs.SetRuinsConfig();
 }