public void TempEnterStageClick() { //NTODO 这里数据应该列表,列表数据来自server StageScnMgr.scnInfo = new StageScnInfoStruct(); StageScnMgr.scnInfo.ScnName = "stage1"; StageScnMgr.scnInfo.roleList = new List <PlayerInfoStruct>(); PlayerInfoStruct r1 = new PlayerInfoStruct(); r1.ID = "isabella"; r1.BodyModelResID = "mdl_isabella_stagea_hairb"; StageScnMgr.scnInfo.roleList.Add(r1); PlayerInfoStruct r2 = new PlayerInfoStruct(); r2.ID = "katya"; r2.BodyModelResID = "mdl_katya_stagea"; StageScnMgr.scnInfo.roleList.Add(r2); PlayerInfoStruct r3 = new PlayerInfoStruct(); r3.ID = "moxi"; r3.BodyModelResID = "mdl_moxi_stagea"; StageScnMgr.scnInfo.roleList.Add(r3); PlayerInfoStruct r4 = new PlayerInfoStruct(); r4.ID = "rose"; r4.BodyModelResID = "mdl_rose_stagea"; StageScnMgr.scnInfo.roleList.Add(r4); PlayerInfoStruct r5 = new PlayerInfoStruct(); r5.ID = "tamamo"; r5.BodyModelResID = "mdl_tamamo_stagea"; StageScnMgr.scnInfo.roleList.Add(r5); PlayerInfoStruct r6 = new PlayerInfoStruct(); r6.ID = "yueling"; r6.BodyModelResID = "mdl_yueling_stagea_low_addblendshape_migicacloth_variant"; StageScnMgr.scnInfo.roleList.Add(r6); AppMgr.GetIns().SetState(AppMgr.AppState.loading); StageScnMgr.Create(); }
public void ExitClick() { AppMgr.GetIns().ExitApp(); }
public void GameClick() { AppMgr.GetIns().SwitchScn("Game"); }
public void ArClick() { AppMgr.GetIns().SwitchScn("AR"); }
public void SetState(StageState state) { if (state == curState) { return; } LogMgr.I("StageScnMgr", "SetState", "状态切换到:" + state, true); preState = curState; StateExit(preState); curState = state; switch (curState) { case StageState.loadScn: GameEnum.SB1.Append(GameConfig.ResRootPathStr); GameEnum.SB1.Append("/bundle/"); GameEnum.SB1.Append(scnInfo.ScnName); GameEnum.SB1.Append(GameEnum.BundleExtName); string scnBundlePath = GameEnum.SB1.ToString(); LogMgr.I("StageScnMgr", "SetState", "加载stage场景 scnBundlePath:" + scnBundlePath, BeShowLog); GameEnum.SB1.Clear(); Action <float> loadScnProgress = (progress) => { float per = ScnProgress * progress; Messenger.Broadcast <float>(GameEvent.loading_progress, per); }; Action <AssetBundle> loadScnCB = (bundle) => { ScnBundle = bundle; LogMgr.I("StageScnMgr", "SetState", "加载stage完毕 scnBundlePath:" + scnBundlePath, BeShowLog); Messenger.Broadcast <float>(GameEvent.loading_progress, ScnProgress); SetState(StageState.loadRole); }; Action <string> errorCB = (error) => { LogMgr.E("StageScnMgr", "SetState", " error:" + error, BeShowLog); }; SimpleResMgr.GetIns().LoadScn(scnInfo.ScnName, scnBundlePath, loadScnProgress, loadScnCB, errorCB); break; case StageState.loadRole: LoadRole(); break; case StageState.loadOther: AppMgr.GetIns().SetState(AppMgr.AppState.stageScn); break; case StageState.initStage: break; case StageState.unloading: break; } }
private void OnClickExit() { AppMgr.GetIns().SwitchScn("MainMenu"); }