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); } }
// Update is called once per frame void Update() { myBaseHP_text.text = MyBaseHP.ToString(); EnermyBaseHP_text.text = EnermyBaseHP.ToString(); Mana_Text.text = Mana.ToString(); if (MyBaseHP <= 0) { Debug.Log("Lose"); } else if (EnermyBaseHP <= 0) { scene_.Set_Reward(true); scene_.Set_Coin(Random.Range(20, 51)); SceneManager.LoadSceneAsync(0); } }
public void Set_Got_Reward() { scene_.Set_Reward(true); }