예제 #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);
                    }
                }
            }
        }
예제 #2
0
 public void Use(AbilityParamaters useParams)
 {
     player.ReceiveHealth(config.HealAmount());
     PlayerParticalEffect();
     PlayAudio();
 }
예제 #3
0
 public void Use(AbilityParamaters useParams)
 {
     combatController.SetWeaponDamage(useParams.baseDamage + config.GetExtraDamage());
     PlayerParticalEffect();
     PlayAudio();
 }
예제 #4
0
 public void Use(AbilityParamaters useParams)
 {
     DealRadialDamage(useParams);
     PlayerParticalEffect();
     PlayAudio();
 }
예제 #5
0
 public void Use(AbilityParamaters useParams)
 {
     behavior.Use(useParams);
 }