32 lines
594 B
C#
32 lines
594 B
C#
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
|
|
void Awake()
|
|
{
|
|
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);
|
|
}
|
|
}
|