using System.Collections; using System.Collections.Generic; using BigSpace.Logic; using BigSpace.XRCore.Event; using RenderHeads.Media.AVProVideo; using Unity.XR.PXR; using UnityEngine; public class SelfCharacterControllCtr : MonoBehaviour { public GameObject bodyBox; CharacterController characterCtr; // Start is called before the first frame update void Start() { GlobalEventMgr.Listen(GameEvent.EventSetReadyCatchAnimal, GameDataManage_EventSetReadyCatchAnimal); characterCtr = GetComponent(); } void GameDataManage_EventSetReadyCatchAnimal(bool isShow) { if (isShow) { bodyBox.gameObject.SetActive(false); characterCtr.enabled = true; } else { characterCtr.enabled = false; bodyBox.gameObject.SetActive(true); } } }