19 lines
382 B
C#
19 lines
382 B
C#
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
using UnityEngine.Events;
|
||
|
|
||
|
public class SpawnTrigger : MonoBehaviour
|
||
|
{
|
||
|
|
||
|
public UnityEvent spawn_event;
|
||
|
public void OnTriggerEnter(Collider other)
|
||
|
{
|
||
|
if (other.tag == "Player")
|
||
|
{
|
||
|
Debug.Log("Player spawned boss");
|
||
|
spawn_event.Invoke();
|
||
|
}
|
||
|
}
|
||
|
}
|