2021-02-25 15:21:35 +01:00
|
|
|
using Ktyl.Util;
|
2021-02-14 16:08:59 +01:00
|
|
|
using System;
|
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
public class EventHandler : MonoBehaviour
|
|
|
|
{
|
|
|
|
public static EventHandler current;
|
|
|
|
|
|
|
|
private void Awake()
|
|
|
|
{
|
|
|
|
current = this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public event Action<int> onArtefactTriggerEnter;
|
|
|
|
public void ArtefactTriggerEnter(int id)
|
|
|
|
{
|
|
|
|
if (onArtefactTriggerEnter != null)
|
|
|
|
{
|
|
|
|
onArtefactTriggerEnter(id);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public event Action<int> onArtefactTriggerExit;
|
|
|
|
public void ArtefactTriggerExit(int id)
|
|
|
|
{
|
|
|
|
if (onArtefactTriggerExit != null)
|
|
|
|
{
|
|
|
|
onArtefactTriggerExit(id);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public event Action<int> onArtefactPickUp;
|
|
|
|
public void ArtefactPickUp(int id)
|
|
|
|
{
|
|
|
|
if (onArtefactPickUp != null)
|
|
|
|
{
|
2021-03-05 14:26:15 +01:00
|
|
|
onArtefactPickUp(id);
|
2021-02-14 16:08:59 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-01 19:09:21 +01:00
|
|
|
public event Action onArtefactUI;
|
|
|
|
|
|
|
|
public void ArtefactUI()
|
|
|
|
{
|
|
|
|
onArtefactUI();
|
|
|
|
}
|
|
|
|
|
2021-02-14 16:08:59 +01:00
|
|
|
}
|