using UnityEngine; using UnityEngine.AI; public class ControlSpecificContent : MyCoroutine { public eCommon StisfyCondition; public string NotOpenMsg; public GameObject[] gos; bool isOpen; float msgTime; private void Awake() { var sdata = ServerInfo.Ins.m_ServerData; isOpen = sdata.Get_Common(StisfyCondition) > 0; if (isOpen) { var obtacle = GetComponentsInChildren(); for (int i = 0; i < obtacle.Length; i++) obtacle[i].carving = false; Set_Coroutine(() => { gameObject.SetActive(false); DSUtil.InActivateGameObjects(gos); }, Time.deltaTime); } msgTime = 0f; } void Update() { if (!isOpen) { if (msgTime > 0f) msgTime -= Time.deltaTime; if (msgTime <= 0f && Vector3.Distance(MyValue.MyPC.Get_position(), transform.position) < 1f) { msgTime = 10f; ToastUI.Ins.Set(0); // TODO 정인호 } } } }