You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
410 B
17 lines
410 B
10 months ago
|
using UnityEngine;
|
||
|
|
||
|
// Attach this script to an object with a 2D collider. This will trigger a broadcast when something collides with it.
|
||
|
public class MessagingClientBroadcast : MonoBehaviour
|
||
|
{
|
||
|
|
||
|
void OnCollisionEnter2D(Collision2D col)
|
||
|
{
|
||
|
MessagingManager.Instance.Broadcast();
|
||
|
}
|
||
|
|
||
|
void OnTriggerEnter2D(Collider2D col)
|
||
|
{
|
||
|
MessagingManager.Instance.Broadcast();
|
||
|
}
|
||
|
|
||
|
}
|