public override void Attack(TD_Enemy e) { // Enable the line line.enabled = true; // Deal damage to enemy e.Damage(damage); // }
void Fire() { if (collided_objects_.Length <= 0) { return; } if (collided_objects_[0] == null) { return; } TD_Enemy target_ = collided_objects_[0].gameObject.GetComponentInParent <TD_Enemy>(); if (!target_.isDead()) { target_.Damage(damage_); Debug.Log(target_.GetHealth()); } }