Ejemplo n.º 1
0
 private void TransitTo(CameraModderParamsBase from, CameraModderParamsBase _toParams, bool isRelease)
 {
     if (from.GetType() == typeof(ThirdPersonCameraParams))
     {
         if (_toParams.GetType() == typeof(ThirdPersonCameraParams))
         {
             FromTpToTp(isRelease, _toParams as ThirdPersonCameraParams);
         }
         else if (_toParams.GetType() == typeof(FirstPersonCameraParams))
         {
             FromTpToFp(isRelease, _toParams as FirstPersonCameraParams);
         }
         else if (_toParams.GetType() == typeof(FocusCameraParams))
         {
             FromTpToFocus(isRelease, _toParams as FocusCameraParams);
         }
         else
         {
             Debug.Log("Camera transition doesnt exists");
         }
     }
     else if (from.GetType() == typeof(FirstPersonCameraParams))
     {
         if (_toParams.GetType() == typeof(ThirdPersonCameraParams))
         {
             FromFpToTp(isRelease, _toParams as ThirdPersonCameraParams);
         }
         else if (_toParams.GetType() == typeof(FirstPersonCameraParams))
         {
             FromFpToFp(isRelease, _toParams as FirstPersonCameraParams);
         }
         else
         {
             Debug.Log("Camera transition doesnt exists");
         }
     }
     else if (from.GetType() == typeof(FocusCameraParams))
     {
         if (_toParams.GetType() == typeof(ThirdPersonCameraParams))
         {
             FromFocusToTp(isRelease, _toParams as ThirdPersonCameraParams);
         }
         else
         {
             Debug.Log("Camera transition doesnt exists");
         }
     }
 }
Ejemplo n.º 2
0
        public void ChangePointerOfCamModderWithID(CameraModderParamsBase _newCamModderParam, string _modifierID)
        {
            if (!camTypeDict.IsOverridenWithKey(_modifierID))
            {
                Debug.Log("No such key-id found, skipping param change... id: " + _modifierID);
                return;
            }
            camTypeDict.Modify(_modifierID, _newCamModderParam);

            if (_newCamModderParam.GetType() == typeof(ThirdPersonCameraParams))
            {
                currentTPModderParams.Reset();
                currentTPModderParams += _newCamModderParam as ThirdPersonCameraParams;
            }
            else if (_newCamModderParam.GetType() == typeof(FirstPersonCameraParams))
            {
                currentFPModderParams.Reset();
                currentFPModderParams += _newCamModderParam as FirstPersonCameraParams;
            }
            else if (_newCamModderParam.GetType() == typeof(FocusCameraParams))
            {
                currentFocusModderParams = _newCamModderParam as FocusCameraParams;
            }
        }