private void HandleScrapObjectDiedEvent(ScrapObjectDiedEvent gameEvent) { if (_objectsInRange.Contains(gameEvent.ScrapObject)) { _objectsInRange.Remove(gameEvent.ScrapObject); } }
private void HandleObjDiedEvent(ScrapObjectDiedEvent objectDiedEvent) { HealthBar targetBar = _bars.Find((bar) => bar.Target == objectDiedEvent.ScrapObject); if (targetBar == null) { return; } Destroy(targetBar.gameObject); }