protected override void HitByDamageArea(DamageArea damage_area) { if (!is_visible_) { // Invincible when not visible return; } base.HitByDamageArea(damage_area); }
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); }
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); } }
// Returns whether it should take this damge or not. protected virtual bool CheckTakeDamage(DamageArea damage_area) { return(false); }
protected override bool CheckTakeDamage(DamageArea damage_area) { return(damage_area.damageGroup == DamageArea.DamageGroup.Enemy); }