Exemple #1
0
 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");
     }
 }
Exemple #2
0
 public virtual void TakeDamage(int value)
 {
     hpSystem.TakeDamage(value);
     hpBar.fillAmount = hpSystem.CurrentLifePercentage();
 }