コード例 #1
0
        public void jump(SkillXmlData jumpDta, float gezi_distance)
        {
            base.stop();
            LGMap lGMap             = GRClient.instance.g_gameM.getObject("LG_MAP") as LGMap;
            Vec2  farthestGPosByOri = lGMap.getFarthestGPosByOri(this.x, this.y, this.lg_ori_angle * 3.14159274f / 180f, gezi_distance);

            this.setPos(farthestGPosByOri.x * 32f, farthestGPosByOri.y * 32f);
        }
コード例 #2
0
        void OnCreateChar(GameEvent e)
        {
            Variant data = e.data;

            debug.Log(data["res"]._int.ToString());
            debug.Log(data.dump());
            if (data["res"]._int == -153)
            {
                flytxt.instance.fly(ContMgr.getCont("a3_createcha_tongming"));
            }
            if (data["res"]._int > 0)
            {
                uint cid = data["cha"]["cid"]._uint;
                PlayerModel.getInstance().cid = cid;
                //  LGPlatInfo.inst.logSDKAP("roleCreate");

                InterfaceMgr.getInstance().close(InterfaceMgr.A3_CREATECHA);
                InterfaceMgr.getInstance().DisposeUI(InterfaceMgr.A3_CREATECHA);

                PlayerModel.getInstance().profession = chooseTab.getSeletedIndex() + 2;
                PlayerModel.getInstance().name       = nameInput.text;

                GameSdkMgr.record_createRole(data["cha"]);

                //当创建角色成功,先不要进入游戏
                //debug.Log("当创建角色成功,先不要进入游戏,进入单机副本");
                SelfRole.s_bStandaloneScene = true;

                //资源会再前面加载,这里必须使用异步加载 map_loading
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.MAP_LOADING);
                //InterfaceMgr.getInstance().ui_async_open("joystick");
                //InterfaceMgr.getInstance().ui_async_open("skillbar");
                InterfaceMgr.getInstance().ui_async_open("a1_gamejoy");
                LGMap lgmap = GRClient.instance.g_gameM.getObject(OBJECT_NAME.LG_MAP) as LGMap;
                lgmap.EnterStandalone();
                MediaClient.instance.StopMusic();
                //MediaClient.instance.clearMusic();

                //if (debug.instance != null)
                //    debug.instance.showMsg(ContMgr.getOutGameCont("debug4"), 3);
            }
        }
コード例 #3
0
        private void OnCreateChar(GameEvent e)
        {
            Variant data = e.data;

            Debug.Log(data["res"]._int);
            Debug.Log(data.dump());
            bool flag = data["res"]._int == -153;

            if (flag)
            {
                flytxt.instance.fly("已存在同名角色", 0, default(Color), null);
            }
            bool flag2 = data["res"]._int > 0;

            if (flag2)
            {
                uint @uint = data["cha"]["cid"]._uint;
                ModelBase <PlayerModel> .getInstance().cid = @uint;

                InterfaceMgr.getInstance().close(InterfaceMgr.A3_CREATECHA);
                InterfaceMgr.getInstance().destory(InterfaceMgr.A3_CREATECHA);
                ModelBase <PlayerModel> .getInstance().profession = this.chooseTab.getSeletedIndex() + 2;

                ModelBase <PlayerModel> .getInstance().name = this.nameInput.text;

                GameSdkMgr.record_createRole(data["cha"]);
                SelfRole.s_bStandaloneScene = true;
                InterfaceMgr.getInstance().open(InterfaceMgr.MAP_LOADING, null, false);
                InterfaceMgr.getInstance().open("joystick", null, false);
                InterfaceMgr.getInstance().open("skillbar", null, false);
                LGMap lGMap = GRClient.instance.g_gameM.getObject("LG_MAP") as LGMap;
                lGMap.EnterStandalone();
                MediaClient.instance.StopMusic();
                MediaClient.instance.clearMusic();
            }
        }
コード例 #4
0
ファイル: mapCalc.cs プロジェクト: atom-chen/rongyaojt
 public mapCalc(LGMap m)
 {
     this._lgmap = m;
 }
コード例 #5
0
 public mapCalc(LGMap m)
 {
     _lgmap = m;
 }
コード例 #6
0
ファイル: GRMap.cs プロジェクト: swordandhonor056/client_code
        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);
            //}
        }