Files
ft/Client/Assets/Scripts/UI/PinballUncountable/PinballUncountableDeathZone.cs
2026-06-29 21:18:33 +08:00

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 });
}
}