protected void S2C_EndDartResult(Pt _info) { //Debug.Log("S2C_EndDartResult"); pt_cart_escort_succ_d616 pt = _info as pt_cart_escort_succ_d616; if (pt != null) { MessageST mst = new MessageST(); mst.messID = 200; mst.delYes = (x) => { // GameCenter.mainPlayerMng.C2S_Fly_Pint(100012,64,228); Command_FlyTo flyTo = new Command_FlyTo(); flyTo.targetScene = 100012; flyTo.targetPos = ActorMoveFSM.LineCast(new Vector3(61, 0, 212), false); flyTo.targetID = 500026; GameCenter.curMainPlayer.commandMng.PushCommand(flyTo); }; GameCenter.messageMng.AddClientMsg(mst); } }
void FlyToInTask() { int targetID = GameCenter.taskMng.CurTargetID; int sceneId = GameCenter.taskMng.CurTargetSceneID; Vector3 point = GameCenter.taskMng.CurTargetPoint; List <FlyExRef> flyExRefList = ConfigMng.Instance.GetAllFlyExRef(); GameCenter.mainPlayerMng.isStartingFlyEffect = false; GameCenter.curMainPlayer.ClearFlyEffect(); for (int i = 0; i < flyExRefList.Count; i++) { if (flyExRefList[i].flyScence == sceneId) { sceneId = flyExRefList[i].goScence; point = new Vector3(flyExRefList[i].goScenceXZ.x, 0, flyExRefList[i].goScenceXZ.y); } } if (point != Vector3.zero) { TaskInfo taskInfo = GameCenter.taskMng.CurfocusTask; if (sceneId == 0) { GameCenter.curMainPlayer.CancelCommands(); GameCenter.curMainPlayer.StopForFly(); Command_FlyTo flyTo = new Command_FlyTo(); flyTo.targetScene = GameCenter.mainPlayerMng.MainPlayerInfo.SceneID; flyTo.targetPos = point; flyTo.targetID = targetID; GameCenter.curMainPlayer.commandMng.PushCommand(flyTo); if (taskInfo != null && taskInfo.TargetPos.x == point.x && taskInfo.TargetPos.y == point.y) { GameCenter.taskMng.CurTaskNeedFly = true; } else { GameCenter.taskMng.CurTaskNeedFly = false; } GameCenter.taskMng.CurTargetSceneID = 0; GameCenter.taskMng.CurTargetPoint = Vector3.zero; GameCenter.taskMng.CurTargetID = 0; //GameCenter.curMainPlayer.GoNormal(); //Debug.Log("结束后ID为" + GameCenter.taskMng.CurTargetID); } else { GameCenter.curMainPlayer.CancelCommands(); GameCenter.curMainPlayer.StopForFly(); Command_FlyTo flyTo = new Command_FlyTo(); flyTo.targetScene = sceneId; flyTo.targetPos = point; flyTo.targetID = targetID; GameCenter.curMainPlayer.commandMng.PushCommand(flyTo); if (taskInfo != null && taskInfo.TargetPos.x == point.x && taskInfo.TargetPos.y == point.y && taskInfo.ContentValue == sceneId) { GameCenter.taskMng.CurTaskNeedFly = true; } else { GameCenter.taskMng.CurTaskNeedFly = false; } GameCenter.taskMng.CurTargetSceneID = 0; GameCenter.taskMng.CurTargetPoint = Vector3.zero; GameCenter.taskMng.CurTargetID = 0; //GameCenter.curMainPlayer.GoNormal(); //Debug.Log("结束后ID为" + GameCenter.taskMng.CurTargetID); } } }