示例#1
0
    private void UpdateOBFocusPos(GodEyeStateParam GodEyeParam)
    {
        GodEyeParam.pos = new Vector3(GodEyeParam.pos.x, 5, GodEyeParam.pos.z);
        if (camCtrl.GetCameraMode() != CameraMode.OBMoveFree)
        {
            CameraOBMoveFreeHandler(true, GodEyeParam);
            return;
        }

        ((OBMoveFreeModeController)camCtrl).UpdateFocusPos(GodEyeParam);
    }
示例#2
0
    public void UpdateGodEyePos(GodEyeStateParam param)
    {
        if (isOBState)
        {
            UpdateOBFocusPos(param);
            return;
        }

        if (!isSurvivalMode)
        {
            UpdateGodEye(param);
        }
    }
示例#3
0
    public void SwitchOBSoliderTarget(U3D_Render.EntityView newSoldier)
    {
        if (newSoldier != null)
        {
            this.soldier = newSoldier;
        }

        if (cameraMode == CameraMode.OBMoveFree)
        {
            GodEyeStateParam godEyeParam = new GodEyeStateParam(this.soldier.gameObject.transform.position, CurrentCamera.transform.eulerAngles, new Vector3(0, 0, -1), Vector3.zero, 15, 60);
            ((OBMoveFreeModeController)camCtrl).UpdateFocusPos(godEyeParam);
            ((OBMoveFreeModeController)camCtrl).UpdateCamera();
        }
    }
示例#4
0
 private void UpdateGodEye(GodEyeStateParam param)
 {
     if (cameraMode != CameraMode.MapGodControl && cameraMode != CameraMode.DeadControl)
     {
         EnableMode(CameraMode.MapGodControl, true, param);
     }
     else
     {
         if (camCtrl.GetCameraMode() == CameraMode.MapGodControl)
         {
             ((MapGodCameraModeController)camCtrl).ChangeGodEyePos(param.pos);
         }
         else if (camCtrl.GetCameraMode() == CameraMode.DeadControl)
         {
             ((DeadCameraModeController)camCtrl).SwitchGodEyePos(param.pos);
         }
     }
 }
示例#5
0
 //进入上帝之眼EnterGodEyeMode(pos,angle,new Vector3(0,0,-1),new Vector3(0,0,0),20.0f,60.0f);
 private void CameraMapGodEyeHandler(bool enabled, CameraStateParam obj)
 {
     if (enabled)
     {
         if (obj == null)
         {
             EnterMapGodEyeMode();
         }
         else
         {
             GodEyeStateParam param = obj as GodEyeStateParam;
             EnterMapGodEyeMode(param.pos, param.angle, param.dir, param.tran, param.distance, param.fov, param.isMiniMap);
         }
     }
     else
     {
         LeaveGodEyeMode();
     }
 }