void BtnExit_OnClickEventHandler(UIButton sender) { Time.timeScale = 1f; StageDC.SendStageSettleRequest(StageDC.GetCompaignStageID(), null, null, true, false); WndManager.DestoryDialog <CombatSchedulerWnd>(); BSC.AntiAllRegisterHooks(); SceneM.Load(MainTownScene.GetSceneName(), false, null, false); }
void Start() { TextAsset binAsset = Resources.Load("Config/sdata", typeof(TextAsset)) as TextAsset; byte[] data = binAsset.bytes; sdata.StaticDataResponse sdResp = new sdata.StaticDataResponse(); sdResp = protobufM.Deserialize(sdResp.ToString(), data) as sdata.StaticDataResponse; DataCenter.LoadStaticDataToLocal(sdResp); DataCenter.SimulationData(); SceneM.Load(MainTownScene.GetSceneName(), false, null, false); }
/// <summary> /// 退出金银岛场景. /// </summary> public static void OutTreasureScene() { if (TreasureScene.m_SceneState == TreasureState.CanvasEdit) { MainTownInit.s_currentState = MainTownState.None; } SceneM.Load(MainTownScene.GetSceneName(), false, false); // UniversalObj.s_instane.SetBackGroundByState(UniversalObjState.None); MainCameraM.s_Instance.EnableDrag(true); TreasureScene.m_SceneState = TreasureState.None; }
// 登记所有的场景处理器 private static void RegisterScene() { SceneM.RegisterScene(CombatScene.GetSceneName(), new CombatScene()); SceneM.RegisterScene(MainTownScene.GetSceneName(), new MainTownScene()); SceneM.RegisterScene(ViewStageScene.GetSceneName(), new ViewStageScene()); SceneM.RegisterScene(TreasureScene.GetSceneName(), new TreasureScene()); SceneM.RegisterLoadingAnim(CombatScene.GetSceneName(), new LoadingMainTown()); SceneM.RegisterLoadingAnim(MainTownScene.GetSceneName(), new LoadingMainTown()); SceneM.RegisterLoadingAnim(ViewStageScene.GetSceneName(), new LoadingMainTown()); SceneM.RegisterLoadingAnim(TreasureScene.GetSceneName(), new LoadingMainTown()); }
private void BackMainScence(UIButton sender) { //下一个战役 if (m_IsPve == true) { if (m_nMode == 0) { SceneM.Load(MainTownScene.GetSceneName(), false, null, false); MainTownInit.s_currentState = MainTownState.StageMap; } //再来一次 else { SceneM.Load(ViewStageScene.GetSceneName(), false, null, false); } } }
private void YesCombatExit(UIButton sender) { BSC.AntiAllRegisterHooks(); Time.timeScale = m_fCurTimeScale; if (BattleEnvironmentM.GetBattleEnvironmentMode() == BattleEnvironmentMode.CombatPVE) { MainTownInit.s_currentState = MainTownState.StageMap; //主动退出的时候需要发送事件 StageDC.SendStageSettleRequest(StageDC.GetCompaignStageID(), null, null, true, false); } CombatWnd wnd = WndManager.FindDialog <CombatWnd>(); if (wnd) { wnd.DestroyGuideFireEffect(); } SceneM.Load(MainTownScene.GetSceneName(), false, null, false); }
void ClickClose(UIButton sender) { SceneM.Load(MainTownScene.GetSceneName(), false, false); MainTownInit.s_currentState = MainTownState.StageMap; }
/// <summary> /// 资源载入入口 /// </summary> //private AsyncOperation async; public override IEnumerator Load() { async = Application.LoadLevelAsync(MainTownScene.GetSceneName()); return(null); }
void BtnAbandon_OnClickEventHandler(UIButton sender) { MainTownInit.s_currentState = MainTownState.StageMap; SceneM.Load(MainTownScene.GetSceneName(), false, null, false); }
/// <summary> /// 战斗跳转到 船只编辑 /// </summary> void BtnGotoShipEdit31_OnClickEventHandler(UIButton sender) { SceneM.Load(MainTownScene.GetSceneName(), false, null, false); MainTownInit.s_currentState = MainTownState.CanvasEdit; }
/// <summary> /// 战斗跳转到 炮弹兵背包 /// </summary> private void BtnGotoPdbbb_OnClickEventHandler(UIButton sender) { SceneM.Load(MainTownScene.GetSceneName(), false, null, false); MainTownInit.s_currentState = MainTownState.MainMenuPdbbb; }
/// <summary> /// 战斗跳转到 陷阱背包 /// </summary> void BtnGotoTrapList31_OnClickEventHandler(UIButton sender) { SceneM.Load(MainTownScene.GetSceneName(), false, null, false); MainTownInit.s_currentState = MainTownState.MainMenuTrapBb; }