protected override void HandleDying() { if (mode == 1) { hpSystem = new HpSystem(MaxHp * (1 + Difficulty / 10)); hpBar.fillAmount = hpSystem.CurrentLifePercentage(); ScreenHpBar.fillAmount = hpSystem.CurrentLifePercentage(); mode = 2; } else { base.HandleDying(); animator.SetBool("WalkForward", false); animator.SetTrigger("Die"); SceneManager.LoadScene("VictoryScene"); } }
public virtual void TakeDamage(int value) { hpSystem.TakeDamage(value); hpBar.fillAmount = hpSystem.CurrentLifePercentage(); }