| 12345678910111213141516171819202122232425262728 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class Base_Spirits : MonoBehaviour
- {
- public GameObject buttons;
- private void OnTriggerEnter(Collider other)
- {
- if (other.gameObject.layer == 6)
- {
- PlayerController pc = other.GetComponent<PlayerController>();
- pc.isBaseBtnOut = true;
- buttons.SetActive(true);
- }
- }
- private void OnTriggerExit(Collider other)
- {
- if (other.gameObject.layer == 6)
- {
- PlayerController pc = other.GetComponent<PlayerController>();
- pc.isBaseBtnOut = false;
- buttons.SetActive(false);
- }
- }
- }
|