_xiaofang/xiaofang/Assets/Script/npc/RecuseNpc.cs
2024-10-21 18:09:07 +08:00

22 lines
405 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class RecuseNpc : MonoBehaviour
{
private Button recusebtn;
private void Start()
{
recusebtn = GameObject.Find("Canvas/Recuse").GetComponent<Button>();
}
private void OnTriggerEnter(Collider other)
{
recusebtn.gameObject.SetActive(true);
}
}