23 lines
463 B
C#
23 lines
463 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class DoActionTrigger : MonoBehaviour
|
|
{
|
|
private bool _hasDoneAction;
|
|
|
|
public void DoAction()
|
|
{
|
|
GameManagerEarly.GetInstance().DoAction = true;
|
|
}
|
|
|
|
private void OnTriggerEnter(Collider col)
|
|
{
|
|
if(col.gameObject.tag == "Player" && !_hasDoneAction)
|
|
{
|
|
DoAction();
|
|
_hasDoneAction = true;
|
|
}
|
|
}
|
|
}
|