コード例 #1
0
 private void ShopTimer_Tick(object sender, EventArgs e)
 {
     if (tick == 0)
     {
         if (ShopInventar.getShop().Count != 0)
         {
             if (Character.GetGold() >= ShopInventar.getShop()[0].GetPrice())
             {
                 ShopInventar.BoughtArtifact(ShopInventar.getShop()[0]);
             }
             else
             {
                 Character.setBuyed(true);
             }
         }
         tick += 1;
     }
     else if (tick == 1)
     {
         Character.setBuyed(true);
         Button_EXIT_Click(sender, e);
         tick = 0;
     }
     UpdateShop();
 }
コード例 #2
0
 private void Button_Pokypka_Click(object sender, EventArgs e)
 {
     if (Character.GetGold() >= ShopInventar.getShop()[listBox1.SelectedIndex].GetPrice())
     {
         ShopInventar.BoughtArtifact(ShopInventar.getShop()[listBox1.SelectedIndex]);
     }
     UpdateShop();
 }