holopy3/Assets/Scripts/EnterPyramidTrigger.cs
Lena Biresch 490ef558ef CleanUp
2021-01-28 13:07:52 +01:00

18 lines
415 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EnterPyramidTrigger : MonoBehaviour
{
public delegate void ThresholdDelegate();
public static event ThresholdDelegate OnEnterPyramid;
private void OnTriggerEnter(Collider other)
{
if (other.gameObject.CompareTag("PlayerBody"))
{
OnEnterPyramid?.Invoke();
}
}
}