using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class Ipad : MonoBehaviour { GameObject curMenu; GameObject curNavigation; public static GameObject curDetail; public GameObject Menu_SY; public GameObject Menu_CJ; public GameObject Navigation_SY; public GameObject Detail_SY; private void Awake() { curMenu = Menu_SY; curNavigation = Navigation_SY; curDetail = Detail_SY; } public void setCurMenu(GameObject menu) { if (!curMenu) { curMenu = Menu_SY; } curMenu.transform.GetChild(0).gameObject.SetActive(false); curMenu = menu; if (curMenu==Menu_CJ) { TaskCenter.GetInstance().FinishTask(5); } curMenu.transform.GetChild(0).gameObject.SetActive(true); ShowNavigation(); } private void ShowNavigation() { if (!curNavigation) { curNavigation = Navigation_SY; } curNavigation.SetActive(false); curMenu.GetComponent().navigation.SetActive(true); curNavigation = curMenu.GetComponent().navigation; } public void SetCurDetail(GameObject target) { curDetail.SetActive(false); target.GetComponent().detail.SetActive(true); curDetail = target.GetComponent().detail; } public void setDefaultDetail(GameObject target) { if (curDetail) { return; } curDetail = target; } }