public void ShowBackToTownBox(object obj) { SoundManager.Instance.PlaySoundEffect("Sound_Button_Default"); /* 新UI修改后去掉判断 * if (BattleSettingPanel == null) * { * BattleSettingPanel = CreatObjectToNGUI.InstantiateObj(BattleSettingPrefab,Center).GetComponent<BattleSettingPanel>(); * } * BattleSettingPanel.ShowPanel(); */ if (BattleSettlementManager.Instance().IsGameSettlement || GameDataManager.Instance.DataIsNull(DataType.InitializeEctype)) { return; } SMSGEctypeInitialize_SC sMSGEctypeInitialize_SC = (SMSGEctypeInitialize_SC)GameDataManager.Instance.PeekData(DataType.InitializeEctype); EctypeContainerData ectypeData = EctypeConfigManager.Instance.EctypeContainerConfigList[sMSGEctypeInitialize_SC.dwEctypeContainerId]; if (ectypeData.MapType == 5) { MessageBox.Instance.Show(3, "", LanguageTextManager.GetString("IDS_H1_490"), LanguageTextManager.GetString("IDS_H2_14"), LanguageTextManager.GetString("IDS_H2_9"), null, BackToTown); } else { MessageBox.Instance.Show(3, "", LanguageTextManager.GetString("IDS_H1_71"), LanguageTextManager.GetString("IDS_H2_14"), LanguageTextManager.GetString("IDS_H2_9"), null, BackToTown); } }
void OnDestroy() { //UIEventManager.Instance.RemoveUIEventHandel(UIEventType.BossDeathMsg, BossDeath); RemoveEventHandler(EventTypeEnum.EctypeFinish.ToString(), EctypeFinishHandle); RemoveEventHandler(EventTypeEnum.EctypeSettleAccount.ToString(), Show); m_Instance = null; Time.timeScale = 1; }
void Awake() { m_Instance = this; }