Exemplo n.º 1
0
        private void ApplyHealing()
        {
            playerHealth.Heal((config as SelfHealConfig).GetHealAmount());               // TODO: consider making it a percent of maximum health heal
            AudioSource audioSource = playerHealth.GetAudioSource();

            audioSource.clip = config.GetRandomSoundClip();
            audioSource.Play();
        }
        public void RegenerateHealth()
        {
            int healthToRegenerate = myHealthSystem.GetMaxHealth() - myHealthSystem.GetCurrentHealth();

            if (healthToRegenerate > 0 && currentVitality >= healthRegenCost)
            {
                myHealthSystem.Heal(1);
                UpdateVitalityAmount(-healthRegenCost);
                UpdateVitalityBar();
            }
        }
Exemplo n.º 3
0
 private void HealCharacter()
 {
     healthSystem.Heal((config as HealingEffectConfig).GetHealingPoints());
 }
Exemplo n.º 4
0
        private void Heal(GameObject target)
        {
            HealthSystem health = GetComponent <HealthSystem>();

            health.Heal((config as SelfHealConfig).GetExtraHealth());
        }