コード例 #1
0
 private void HandleScrapObjectDiedEvent(ScrapObjectDiedEvent gameEvent)
 {
     if (_objectsInRange.Contains(gameEvent.ScrapObject))
     {
         _objectsInRange.Remove(gameEvent.ScrapObject);
     }
 }
コード例 #2
0
    private void HandleObjDiedEvent(ScrapObjectDiedEvent objectDiedEvent)
    {
        HealthBar targetBar = _bars.Find((bar) => bar.Target == objectDiedEvent.ScrapObject);

        if (targetBar == null)
        {
            return;
        }

        Destroy(targetBar.gameObject);
    }