public void ReShop() { if (scene_.Get_Coin() >= 50) { Create(); scene_.Set_Coin(scene_.Get_Coin() - 50); for (int i = 0; i < 3; i++) { Destroy(inven_obj[0]); inven_obj.RemoveAt(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); } }
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; }
// Update is called once per frame void Update() { coin.text = "Coin : " + scene_.Get_Coin().ToString(); }