123456789101112131415161718192021222324252627282930313233 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class roomChecker : MonoBehaviour
- {
- public GameObject outerGrid;
- public GameObject caveGrid;
- private void OnTriggerEnter2D(Collider2D other) {
- if(other.tag == "Player"){
- if(other.transform == playerNetwork.localPlayerTransform){
- outerGrid.SetActive(false);
- caveGrid.SetActive(true);
- }
-
- }
- }
- private void OnTriggerExit2D(Collider2D other) {
- if(other.tag == "Player"){
- if(other.transform == playerNetwork.localPlayerTransform){
- outerGrid.SetActive(true);
- caveGrid.SetActive(false);
- }
- }
- }
- void Update()
- {
-
- }
- }
|