Example #1
0
 public void AddtoInven(string card_index, int pos)
 {
     deck.RemoveCard(pos);
     inven.AddCard(card_index);
     Short_inven(pos);
     inven.Card_form_Deck();
 }
Example #2
0
 public void Select_this_card()
 {
     if (free == true)
     {
         scene_.Set_Reward(false);
         inven.AddCard(This_Card_index);
         inven.Card_form_Deck();
         Destroy(canvas);
     }
     else if (free == false && scene_.Get_Coin() >= prize_int)
     {
         scene_.Set_Coin(scene_.Get_Coin() - prize_int);
         scene_.Set_Reward(false);
         inven.AddCard(This_Card_index);
         inven.Card_form_Deck();
         Destroy(canvas);
     }
 }
Example #3
0
 public void Get_Item()
 {
     if (first_time == false)
     {
         if (check_name[inven_obj.Count - 6] == 0)
         {
             Debug.Log(name[0]);
             scene_.Set_Coin(scene_.Get_Coin() + 50);
         }
         else if (check_name[inven_obj.Count - 6] == 1)
         {
             Debug.Log(name[1]);
             scene_.Set_Coin(scene_.Get_Coin() + 100);
         }
         else if (check_name[inven_obj.Count - 6] == 2)
         {
             Debug.Log(name[2]);
             scene_.Set_Coin(scene_.Get_Coin() - 50);
         }
         else if (check_name[inven_obj.Count - 6] == 3)
         {
             Debug.Log(name[3]);
             inven.AddCard("00" + Random.Range(1, 5).ToString());
             inven.Card_form_Deck();
         }
         else if (check_name[inven_obj.Count - 6] == 4)
         {
             Debug.Log(name[4]);
             inven.AddCard("00" + Random.Range(5, 9).ToString());
             inven.Card_form_Deck();
         }
         else if (check_name[inven_obj.Count - 6] == 5)
         {
             Debug.Log(name[5]);
         }
     }
     first_time = false;
 }