private void OnEnable() { indexContainer.SetActive(true); currentOpen = Constants.NOTE_STATUS.INDEX; DataManager.GetInstance().blockClick = true; DataManager.GetInstance().blockBacklog = true; }
private void SwitchTo(Constants.NOTE_STATUS target) { //关闭旧界面 switch (currentOpen) { case Constants.NOTE_STATUS.INDEX: indexContainer.SetActive(false); break; case Constants.NOTE_STATUS.SELF: selfContainer.SetActive(false); break; case Constants.NOTE_STATUS.LOVE: loveContainer.SetActive(false); break; case Constants.NOTE_STATUS.EVIDENCE: eviContainer.SetActive(false); break; case Constants.NOTE_STATUS.APP: helpContainer.SetActive(false); break; } //打开新界面 switch (target) { case Constants.NOTE_STATUS.INDEX: indexContainer.SetActive(true); break; case Constants.NOTE_STATUS.SELF: selfContainer.SetActive(true); break; case Constants.NOTE_STATUS.LOVE: loveContainer.SetActive(true); break; case Constants.NOTE_STATUS.EVIDENCE: eviContainer.SetActive(true); break; case Constants.NOTE_STATUS.APP: helpContainer.SetActive(true); break; } currentOpen = target; }
/// <summary> /// 界面初始化 /// </summary> private void NoteInit() { indexContainer.SetActive(true); //默认开启界面 currentOpen = Constants.NOTE_STATUS.INDEX; //设置系统时间 int hour = DateTime.Now.Hour; int minute = DateTime.Now.Minute; pcTime.text = DateTime.Now.ToString("HH:mm"); //游戏时间 DateTime gday = DataManager.GetInstance().GetToday(); gameDay.text = gday.ToString("MM月dd日"); //系统电量 //系统网络 //设置是否有new SetNewIcon(); }
private void SwitchTo(Constants.NOTE_STATUS target) { //关闭旧界面 switch (currentOpen) { case Constants.NOTE_STATUS.INDEX: indexContainer.SetActive(false); break; case Constants.NOTE_STATUS.SELF: selfContainer.SetActive(false); break; case Constants.NOTE_STATUS.LOVE: loveContainer.SetActive(false); break; case Constants.NOTE_STATUS.EVIDENCE: eviContainer.SetActive(false); break; case Constants.NOTE_STATUS.CALENDAR: calContainer.SetActive(false); break; case Constants.NOTE_STATUS.TOUR: tourContainer.SetActive(false); break; case Constants.NOTE_STATUS.WIKI: wikiContainer.SetActive(false); break; //case Constants.NOTE_STATUS.APP: // appContainer.SetActive(false); // break; } //打开新界面 switch (target) { case Constants.NOTE_STATUS.INDEX: indexContainer.SetActive(true); middleCon.SetActive(true); break; case Constants.NOTE_STATUS.SELF: selfContainer.SetActive(true); break; case Constants.NOTE_STATUS.LOVE: loveContainer.SetActive(true); break; case Constants.NOTE_STATUS.EVIDENCE: eviContainer.SetActive(true); break; case Constants.NOTE_STATUS.CALENDAR: calContainer.SetActive(true); break; case Constants.NOTE_STATUS.TOUR: tourContainer.SetActive(true); break; case Constants.NOTE_STATUS.WIKI: wikiContainer.SetActive(true); break; //case Constants.NOTE_STATUS.APP: // appContainer.SetActive(true); // break; } currentOpen = target; }