public void ResetBossView() { switch (PlayerStats.instance.stats.curStage) { case 0: curBossTime = 20f; bossInPrice = 1000; bossResult = 10000; bossResultS = 5000; bossHP = 10000f; bossNameTag = "버려진 라이터"; Ingame.instance.spawnMob = 10; break; case 1: curBossTime = 30f; bossInPrice = 5000; bossResult = 50000; bossResultS = 25000; bossHP = 200000f; bossNameTag = "미세 플라스틱"; Ingame.instance.spawnMob = 12; break; case 2: curBossTime = 40f; bossInPrice = 10000; bossResult = 100000; bossResultS = 50000; bossHP = 1000000f; bossNameTag = "이산화 탄소"; Ingame.instance.spawnMob = 14; break; case 3: curBossTime = 50f; bossInPrice = 30000; bossResult = 300000; bossResultS = 150000; bossHP = 500000000f; bossNameTag = "폐기물 혼합체"; Ingame.instance.spawnMob = 17; break; default: break; } bossImage.sprite = bossImages[PlayerStats.instance.stats.curStage]; imageSprite.sprite = bossSprites[PlayerStats.instance.stats.curStage]; bossStageHP = ETC.Calculation(bossStageHP, bossHP); bossStatsText.text = "[" + bossNameTag.ToString() + "]" + "\n" + "HP : "; bossStatsText.text += bossStageHP.text; bossInText = ETC.Calculation(bossInText, bossInPrice); bossResultCoin = ETC.Calculation(bossResultCoin, bossResult); bossResultSCoin = ETC.Calculation(bossResultSCoin, bossResultS); }
void ResetStatsView() { int price = 0; if (PlayerStats.instance.stats.critPercentLv < 50) { crit1Lv.text = PlayerStats.instance.stats.critPercentLv.ToString(); crit1NextLv.text = (PlayerStats.instance.stats.critPercentLv + 1).ToString(); crit1Percent.text = ETC.GetCritHit(PlayerStats.instance.stats.critPercentLv).ToString() + "%"; price = (int)ETC.GetCoin(PlayerStats.instance.stats.critPercentLv); crit1Price = ETC.Calculation(crit1Price, price); } else { crit1Lv.text = "MAX Level"; crit1NextLv.text = "MAX"; crit1Percent.text = ETC.GetCritHit(PlayerStats.instance.stats.critPercentLv).ToString() + "%"; crit1Price.text = "NONE"; } if (PlayerStats.instance.stats.critDamageLv < 50) { crit2Lv.text = PlayerStats.instance.stats.critDamageLv.ToString(); crit2NextLv.text = (PlayerStats.instance.stats.critDamageLv + 1).ToString(); crit2Damage.text = ETC.GetCritDmg(PlayerStats.instance.stats.critDamageLv).ToString() + "%"; price = (int)ETC.GetCoin(PlayerStats.instance.stats.critDamageLv); crit2Price = ETC.Calculation(crit2Price, price); } else { crit2Lv.text = "MAX Level"; crit2NextLv.text = "MAX"; crit2Damage.text = ETC.GetCritHit(PlayerStats.instance.stats.critPercentLv).ToString() + "%"; crit2Price.text = "NONE"; } if (PlayerStats.instance.stats.coinPercentLv < 100) { coinLv.text = PlayerStats.instance.stats.coinPercentLv.ToString(); coinNextLv.text = (PlayerStats.instance.stats.coinPercentLv + 1).ToString(); coinPercent.text = PlayerStats.instance.stats.coinPercentLv.ToString() + "%"; price = (int)ETC.GetCoin(PlayerStats.instance.stats.coinPercentLv); coinPrice = ETC.Calculation(coinPrice, price); } else { coinLv.text = "MAX Level"; coinNextLv.text = "MAX"; coinPercent.text = ETC.GetCritHit(PlayerStats.instance.stats.critPercentLv).ToString() + "%"; coinPrice.text = "NONE"; } GameLogic.instance.Save(); }
void FixedUpdate() { transform.position += Vector3.up * Time.deltaTime; damageText.color -= new Color(0, 0, 0, Time.deltaTime); damageText = ETC.Calculation(damageText, getDamage); if (!isCrit) { damageText.fontSize = 45; } else { damageText.fontSize = 90; } }
void Update() { if (PlayerStats.instance.stats.playerCoin >= 0) { MyCoin = ETC.Calculation(MyCoin, PlayerStats.instance.stats.playerCoin); } else if (PlayerStats.instance.stats.playerCoin < 0) { MyCoin.text = "0"; } if (PlayerStats.instance.stats.playerSpecialCoin >= 0) { MySpecialCoin = ETC.Calculation(MySpecialCoin, PlayerStats.instance.stats.playerSpecialCoin); } else if (PlayerStats.instance.stats.playerSpecialCoin < 0) { MySpecialCoin.text = "0"; } }