Exemple #1
0
        private void DealRadialDamage(AbilityParamaters useParams)
        {
            RaycastHit[] hits = Physics.SphereCastAll(
                transform.position,
                config.GetRadius(),
                Vector3.forward,
                config.GetRadius()
                );

            foreach (RaycastHit hit in hits)
            {
                var damageable = hit.collider.gameObject.GetComponent <IDamageable>();
                if (damageable != null)
                {
                    if (hit.collider.gameObject.layer != PLAYER_LAYER)
                    {
                        float damageToDeal = config.GetPerTargetDamage() + useParams.baseDamage;
                        damageable.TakeDamage(damageToDeal);
                    }
                }
            }
        }
Exemple #2
0
 public void Use(AbilityParamaters useParams)
 {
     player.ReceiveHealth(config.HealAmount());
     PlayerParticalEffect();
     PlayAudio();
 }
Exemple #3
0
 public void Use(AbilityParamaters useParams)
 {
     combatController.SetWeaponDamage(useParams.baseDamage + config.GetExtraDamage());
     PlayerParticalEffect();
     PlayAudio();
 }
Exemple #4
0
 public void Use(AbilityParamaters useParams)
 {
     DealRadialDamage(useParams);
     PlayerParticalEffect();
     PlayAudio();
 }
Exemple #5
0
 public void Use(AbilityParamaters useParams)
 {
     behavior.Use(useParams);
 }