Esempio n. 1
0
 public void DealDamage(InteractableObjectBehavior enemy, Damage damage)
 {
     if (enemy != null && damage != null)
     {
         enemy.OnTakeDamageHandler(damage);
     }
 }
Esempio n. 2
0
        private void OnRightHitBoxHit(ITrigger hitBox, Collider enemy)
        {
            if (enemy.transform.GetComponent <InteractableObjectBehavior>() != null && hitBox.IsInteractable)
            {
                InteractableObjectBehavior enemyBehavior = enemy.transform.GetComponent <InteractableObjectBehavior>();

                DealDamage(enemyBehavior, _services.AttackService.CountDamage(_characterModel.RightHandWeapon,
                                                                              _characterModel.CharacterStatsSettings, enemyBehavior.Stats));
                hitBox.IsInteractable = false;
            }
        }
Esempio n. 3
0
        public void DealDamage(InteractableObjectBehavior enemy, Damage damage)
        {
            InteractableObjectBehavior enemyBehavior = enemy.GetComponent <PlayerBehavior>();

            enemyBehavior.OnTakeDamageHandler(Services.SharedInstance.AttackService.CountDamage(damage, Stats, enemyBehavior.Stats));
        }