27 lines
618 B
C#
27 lines
618 B
C#
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<Manager>().EventAggregator;
|
|
}
|
|
|
|
void OnTriggerEnter2D(Collider2D collision)
|
|
{
|
|
if (collision.gameObject.CompareTag("PinballUncountable"))
|
|
_ea.Publish(new EventHitDeathZone { Ball = collision.gameObject });
|
|
}
|
|
}
|