예제 #1
0
    /*
     * .##.....##.########.##.......########..########.########...######.
     * .##.....##.##.......##.......##.....##.##.......##.....##.##....##
     * .##.....##.##.......##.......##.....##.##.......##.....##.##......
     * .#########.######...##.......########..######...########...######.
     * .##.....##.##.......##.......##........##.......##...##.........##
     * .##.....##.##.......##.......##........##.......##....##..##....##
     * .##.....##.########.########.##........########.##.....##..######.
     */

    private void TakeDamage(float damage)
    {
        if (invisible)
        {
            return;
        }
        _health.ApplyDamage(damage);
        _damageDisplayManager.TakeDamage();
    }
예제 #2
0
    private void TakeDamage(float damage)
    {
        if (!invisible)
        {
            invisible = false;
            _health.ApplyDamage(damage);
        }

        _simpleDamageDisplayManager.TakeDamage();
    }
예제 #3
0
 protected override void ApplyDamage(IHealth health)
 {
     health.ApplyDamage(_damage);
 }
        // private void AddTargetToNotify(GameObject target){
        //     targetsToNotify.Add(target);
        // }

        // public void RemoveTargetToNotify(GameObject target){
        //     targetsToNotify.Remove(target);
        // }
        public void ApplyDamage(ICharacter instigator, float damage)
        {
            _health.ApplyDamage(GetBlockingDamage(instigator, damage));
        }
예제 #5
0
 private void OnCollisionEnter2D(Collision2D other)
 {
     _health.ApplyDamage(10.0f);
 }
 void IBullet.ApplyDamageOnHit(IHealth hitObject)
 {
     hitObject.ApplyDamage(damage);
 }