void Hp_scaleChecker() { if (NowHp <= 0) { ingame_sc.Prepare(); hp_bar.SetActive(false); anim.SetTrigger("die"); monster_live = false; Destroy(Now_Monster, 1.5f); // int money = (Singleton.getInstance.RuneEffect_money_percent / 100) * GainGold + GainGold; Debug.Log(money); CreateCoin(); Coin_num = 4; Singleton.getInstance.money += money; Money_t.text = Singleton.getInstance.money + " G"; PlayerPrefs.SetInt("Money", Singleton.getInstance.money); PlayerPrefs.Save(); int rand = Random.Range(0, 100); if (rand < 3) { int rands = Random.Range(0, 8); GameObject ruenss = Instantiate(Rune_pf[rands]); ruenss.transform.SetParent(DropRunes.transform); ruenss.transform.localScale = new Vector3(1, 1, 1); ruenss.transform.localPosition = new Vector3(0, -60, 0); switch (rand) { case 0: Rune.possess_Rune.Add(RuneType.blue); break; case 1: Rune.possess_Rune.Add(RuneType.purple); break; case 2: Rune.possess_Rune.Add(RuneType.red); break; case 3: Rune.possess_Rune.Add(RuneType.yellow); break; case 4: Rune.possess_Rune.Add(RuneType.blue2); break; case 5: Rune.possess_Rune.Add(RuneType.purple2); break; case 6: Rune.possess_Rune.Add(RuneType.red2); break; case 7: Rune.possess_Rune.Add(RuneType.yellow2); break; } } } hp_bar_img.fillAmount = (float)NowHp / (float)MaxHp; }