using System.Collections; using System.Collections.Generic; using asap.core; using UnityEngine; using PinballUncountable; public class PinballUncountableDeathZone : MonoBehaviour { private IEventAggregator _ea; // public void Init(IEventAggregator ea) // { // _ea = ea; // } private void Awake() { _ea = GContext.container.Resolve().EventAggregator; } void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.CompareTag("PinballUncountable")) _ea.Publish(new EventHitDeathZone { Ball = collision.gameObject }); } }