Ejemplo n.º 1
0
        public void addHealthPlayer(float bonusHealth)
        {
            HealthGlobeControl healhPlayer = GameObject.FindObjectOfType <HealthGlobeControl>();

            this.maxHealthPoints += bonusHealth;
            this.HealthPoints    += bonusHealth;

            healhPlayer.healthSlider.value = HealthPoints / maxHealthPoints;
        }
Ejemplo n.º 2
0
 public void ResetLifePlayer()
 {
     if (CompareTag("Player"))
     {
         HealthPoints = maxHealthPoints;
         _animator.ResetTrigger("die");
         _animator.Play("Locomotion");
         IsDead = false;
         _capsuleCollider.enabled = true;
         _navMeshAgent.enabled    = true;
         HealthGlobeControl healhPlayer = GameObject.FindObjectOfType <HealthGlobeControl>();
         healhPlayer.healthSlider.value = 1;
     }
 }