2024-10-23 11:31:35 +08:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
using UnityEngine.UI;
|
|
|
|
public class FireHydrant : MonoBehaviour
|
|
|
|
{
|
|
|
|
private GameObject xfs;
|
|
|
|
|
|
|
|
// Start is called before the first frame update
|
2024-10-23 20:48:23 +08:00
|
|
|
void Awake()
|
2024-10-23 11:31:35 +08:00
|
|
|
{
|
|
|
|
xfs = GameObject.Find("Canvas/xfs");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Update is called once per frame
|
|
|
|
void Update()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
private void OnTriggerEnter(Collider other)
|
|
|
|
{
|
|
|
|
xfs.gameObject.SetActive(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
private void OnTriggerExit(Collider other)
|
|
|
|
{
|
|
|
|
xfs.gameObject.SetActive(false);
|
|
|
|
}
|
|
|
|
}
|