public void clearCurCamera() { bool flag = this.curGoCamera == null; if (!flag) { this.curScCamera.clearAllPrelab(); GRMap.GAME_CAMERA.SetActive(true); UnityEngine.Object.Destroy(this.curGoCamera); this.curGoCamera = null; this.curScCamera = null; this.animator = null; Globle.setTimeScale(1f); } }
public void clearCurCamera() { if (curGoCamera == null) { return; } curScCamera.clearAllPrelab(); GRMap.GAME_CAMERA.SetActive(true); GameObject.Destroy(curGoCamera); curGoCamera = null; curScCamera = null; animator = null; Globle.setTimeScale(1f); }
public void QSMY_SetTimeScale(int f) { Globle.setTimeScale((float)f / 100); }
private void DoPlotPlayOver() { // (m_map as GRMap3D).SetMapFogAndAnimbent(); //这里赋值场景的雾效和全局光 Globle.setTimeScale(1f); //重新设置当前的播放速度 //这里要做还原,去除场景中不要的物件,或者上层剧情脚本自己去除 //GRClient.instance.getGraphCamera().visible = true; //if (lgSelfPlayer.instance != null && lgSelfPlayer.instance.lggrAvatar != null) // lgSelfPlayer.instance.lggrAvatar.updateToTerrainZ(); //剧情高级字幕效果的挂接点 //plot_linkui.ClearAll(); //InterfaceMgr.getInstance().delclose(InterfaceMgr.PLOT_LINKUI); //Dictionary<uint, LGAvatarMonster> mons = LGMonsters.instacne.getMons(); //foreach (LGAvatarMonster m in mons.Values) //{ // m.grAvatar.m_char.visible = true; //} //Vector3 oldpos = GAME_CAMERA.transform.position; // GameObject.Destroy(GAME_CAMERA); // debug.Log("加载当前地图的摄像机 " + m_nCurMapID); // string game_cam_id = null; // GameObject game_cam_prefab = null; // Variant map_gconf = this.g_mgr.g_sceneM.getGMapInfo(m_nCurMapID.ToString()); //debug.Log(map_gconf.dump()); //if (map_gconf != null && map_gconf.ContainsKey("gamecamera")) //{ // game_cam_id = map_gconf["gamecamera"]; // string curmap_game_cam = "GAME_CAMERA_" + game_cam_id.ToString(); // game_cam_prefab = U3DAPI.U3DResLoad<GameObject>(curmap_game_cam); //} //if (game_cam_prefab == null) //{ // game_cam_prefab = U3DAPI.U3DResLoad<GameObject>("GAME_CAMERA"); //} // GAME_CAMERA = GameObject.Instantiate(game_cam_prefab) as GameObject; //GAME_CAM_CAMERA = GAME_CAMERA.transform.GetChild(0).GetComponent<Camera>(); //GAME_CAM_CUR = GAME_CAMERA.transform.GetChild(0).gameObject; //if (GAME_CAMERA.transform.childCount >= 2) GAME_CAM_NEAR = GAME_CAMERA.transform.GetChild(1).gameObject; M_VGame_Cam_FARpos = GAME_CAM_CUR.transform.localPosition; M_VGame_Cam_FARrot = GAME_CAM_CUR.transform.localEulerAngles; // GameRoomMgr.getInstance().onChangeLevel(); UiEventCenter.getInstance().onMapChanged(); LGMap lgmap = GRClient.instance.g_gameM.getObject(OBJECT_NAME.LG_MAP) as LGMap; lgmap.playMapMusic(disconect.needResetMusic); disconect.needResetMusic = false; //if (skillbar.instance != null) // skillbar.setAutoFightType(0); //if (lgSelfPlayer.instance != null && lgSelfPlayer.instance.lggrAvatar != null) //{ // Vector3 my_newmap_pos = lgSelfPlayer.instance.pGameobject.transform.position; // my_newmap_pos.x = lgSelfPlayer.instance.lggrAvatar.m_xMoveto; // my_newmap_pos.y = lgSelfPlayer.instance.lggrAvatar.m_zMoveto; // my_newmap_pos.z = lgSelfPlayer.instance.lggrAvatar.m_yMoveto; // lgSelfPlayer.instance.pGameobject.transform.position = my_newmap_pos; // (GRClient.instance.g_gameM.getObject(OBJECT_NAME.LG_CAMERA) as LGCamera).updateMainPlayerPos(true); //} }