Example #1
0
 protected override void HitByDamageArea(DamageArea damage_area)
 {
     if (!is_visible_)
     {
         // Invincible when not visible
         return;
     }
     base.HitByDamageArea(damage_area);
 }
Example #2
0
        protected virtual void HitByDamageArea(DamageArea damage_area)
        {
            if (hit_damagearea_ids.Contains(damage_area.uniqueId))
            {
                // Saint Seiya will never be hit by the same damage twice!
                return;
            }

            hit_damagearea_ids.Add(damage_area.uniqueId);
            hp -= damage_area.damage;
            Debug.Log("Hit to " + name);
            damage_area.OnTakeDamage(this);
        }
Example #3
0
        protected override void HitByDamageArea(DamageArea damage_area)
        {
            Bullet bullet = damage_area.GetComponent <Bullet>();

            if (bullet == null || remain_reflect_num_ <= 0)
            {
                base.HitByDamageArea(damage_area);
            }
            else
            {
                if ((--remain_reflect_num_) == 0)
                {
                    shieldParticle.Stop();
                }
                bullet.Reflect(characterData.atk, DamageArea.DamageGroup.Enemy);
            }
        }
Example #4
0
 // Returns whether it should take this damge or not.
 protected virtual bool CheckTakeDamage(DamageArea damage_area)
 {
     return(false);
 }
Example #5
0
 protected override bool CheckTakeDamage(DamageArea damage_area)
 {
     return(damage_area.damageGroup == DamageArea.DamageGroup.Enemy);
 }