public void ActiveGenSuiMoveCam(int indexVal)
	{
		if (indexVal < 0 || indexVal >= GenSuiMoveCam.Length || GenSuiMoveCam[indexVal] == null) {
			Debug.LogWarning("indexVal or GenSuiMoveCam[i] was wrong!");
			GameObject obj = null;
			obj.name = "null";
			return;
		}

		if (Network.peerType == NetworkPeerType.Server/* || XkGameCtrl.GetInstance().IsServerCameraTest*/) {
			if (Camera.main.gameObject != XkGameCtrl.ServerCameraObj) {
				if (Camera.main != null) {
					Camera.main.enabled = false;
				}
			}
			XkGameCtrl.SetServerCameraTran(GenSuiMoveCam[indexVal].transform);
		}
		else {
			if (Camera.main != GetComponent<Camera>()) {
				if (Camera.main != null) {
					Camera.main.enabled = false;
				}
			}
			GenSuiMoveCam[indexVal].SetActive(true);
		}
	}
    void CheckDingDianNoAimCam()
    {
        if (CamState != PSCameraState.DingDianNoAimCam)
        {
            return;
        }

        if (DingDianNoAimObj == null)
        {
            return;
        }

        if (Network.peerType == NetworkPeerType.Server /* || XkGameCtrl.GetInstance().IsServerCameraTest*/)
        {
            if (Camera.main.gameObject != XkGameCtrl.ServerCameraObj)
            {
                if (Camera.main != null)
                {
                    Camera.main.enabled = false;
                }
            }
            PSDingDianNoAimCamera.DingDianNoAimCamera = DingDianNoAimObj;
            XkGameCtrl.SetServerCameraTran(DingDianNoAimObj.transform);
        }
        else
        {
            if (Camera.main != null)
            {
                Camera.main.enabled = false;
            }
            DingDianNoAimObj.SetActive(true);
        }
    }
 public void MoveCameraByItween(XkPlayerCtrl playerScript)
 {
     ZYMoveCamera = gameObject;
     if (Network.peerType == NetworkPeerType.Server /* || XkGameCtrl.GetInstance().IsServerCameraTest*/)
     {
         if (Camera.main.gameObject != XkGameCtrl.ServerCameraObj)
         {
             if (Camera.main != null)
             {
                 Camera.main.enabled = false;
             }
         }
         XkGameCtrl.SetServerCameraTran(RealCamTran);
     }
     else
     {
         if (Camera.main != null)
         {
             Camera.main.enabled = false;
         }
         RealCamTran.gameObject.SetActive(true);
     }
     //AimTran = playerScript.transform;
     InitMovePlayerByMarkSpeed();
 }
    public void ActiveCamera(Transform playerTran)
    {
        AimPlayerTran = playerTran;
        if (Network.peerType == NetworkPeerType.Server /* || XkGameCtrl.GetInstance().IsServerCameraTest*/)
        {
            if (Camera.main.gameObject != XkGameCtrl.ServerCameraObj)
            {
                if (Camera.main != null)
                {
                    Camera.main.enabled = false;
                }
            }

            if (CameraCom != null)
            {
                CameraCom.enabled = false;
            }
            DingDianAimCamera = gameObject;
            CameraCom         = XkGameCtrl.ServerCameraObj.GetComponent <Camera>();
            XkGameCtrl.SetServerCameraTran(transform);
        }
        else
        {
            if (Camera.main != null)
            {
                Camera.main.enabled = false;
            }
            gameObject.SetActive(true);
        }
    }