public override void FireEvent() { if (!AffectedObject) { return; } if (!Application.isPlaying && Application.isEditor) { } else { table.MapDataBase data = GameTableManager.Instance.GetTableItem <table.MapDataBase>(sceneID); if (data == null) { return; } table.ResourceDataBase resDB = GameTableManager.Instance.GetTableItem <table.ResourceDataBase>(data.dwResPath); if (resDB == null) { return; } Engine.IRenderSystem rs = Engine.RareEngine.Instance().GetRenderSystem(); if (rs != null) { string str = resDB.strPath; Engine.IScene scene = rs.EnterScene(ref str, SequencerManager.Instance()); if (scene != null) { ///¼ÓÔس¡¾° SequencerManager.Instance().Pause(); scene.StartLoad(Vector3.one); //±£´æÏÂmapid Client.IMapSystem map = Client.ClientGlobal.Instance().GetMapSystem(); SequencerManager.Instance().m_MapID = map.GetMapID(); } } } }
void SetSelectGrid(int index) { if (index < m_lstTransfers.Count) { TransferData m_data = m_lstTransfers[index]; if (m_data != null) { if (m_data.isNpc) { TransferDatabase transferdata = GameTableManager.Instance.GetTableItem <TransferDatabase>(m_data.tabID); if (!KHttpDown.Instance().SceneFileExists(transferdata.mapid)) { //打开下载界面 DataManager.Manager <UIPanelManager>().ShowPanel(PanelID.DownloadPanel); HideSelf(); return; } NetService.Instance.Send(new stDialogSelectScriptUserCmd_C() { step = m_data.step, dwChose = m_data.btnIndex, }); } else { TransferDatabase transferdata = GameTableManager.Instance.GetTableItem <TransferDatabase>(m_data.tabID); if (transferdata == null) { return; } string strMsg = string.Format("是否花费 [ff0000]{0}{1}[-] 传送到{2}", transferdata.costValue, ((ClientMoneyType)transferdata.costType).GetEnumDescription(), transferdata.strTransmitMap); TipsManager.Instance.ShowTipWindow(Client.TipWindowType.CancelOk, strMsg, delegate() { DataManager.Manager <TeamDataManager>().TeamMemberCheckAndCancelFollow();//取消队员跟随 Client.IControllerSystem cs = Client.ClientGlobal.Instance().GetControllerSystem(); if (cs != null) { cs.GetCombatRobot().Stop();// 停止挂机 } ClientMoneyType montype = (ClientMoneyType)transferdata.costType; if (MainPlayerHelper.IsHasEnoughMoney(montype, transferdata.costValue)) { Client.IMapSystem mapsys = Client.ClientGlobal.Instance().GetMapSystem(); if (mapsys != null) { if (mapsys.GetMapID() == transferdata.mapid) { //你就在这个场景 TipsManager.Instance.ShowTipsById(514); return; } //httpdown if (!KHttpDown.Instance().SceneFileExists(transferdata.mapid)) { //打开下载界面 DataManager.Manager <UIPanelManager>().ShowPanel(PanelID.DownloadPanel); return; } mapsys.RequestEnterMap(transferdata.mapid, 1); HideSelf(); } } }); } } } }