33 lines
638 B
C#
33 lines
638 B
C#
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
using UnityEngine.UI;
|
||
|
public class DiStributionbox : MonoBehaviour
|
||
|
{
|
||
|
private Button disbtn;
|
||
|
// Start is called before the first frame update
|
||
|
void Start()
|
||
|
{
|
||
|
disbtn = GameObject.Find("Canvas/Distribution box").GetComponent<Button>();
|
||
|
}
|
||
|
|
||
|
// Update is called once per frame
|
||
|
void Update()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
private void OnTriggerEnter(Collider other)
|
||
|
{
|
||
|
disbtn.gameObject.SetActive(true);
|
||
|
}
|
||
|
|
||
|
private void OnTriggerExit(Collider other)
|
||
|
{
|
||
|
disbtn.gameObject.SetActive(false);
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
}
|