_xiaofang/xiaofang/Assets/Script/npc/RecuseNpc.cs

22 lines
405 B
C#
Raw Normal View History

2024-10-21 18:09:07 +08:00
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);
}
}