Esempio n. 1
0
 /// <summary>
 /// Switches the camera mode.
 /// </summary>
 /// <param name="state">State</param>
 public void SwitchCameraState(CameraState state)
 {
     if (_cameraState != null)
     {
         _cameraState.End();
     }
     _cameraState = state;
     _cameraState.Init();
 }
Esempio n. 2
0
 /// <summary>
 /// Switches the camera mode.
 /// </summary>
 /// <param name="state">State</param>
 public void SwitchCameraState(CameraState state)
 {
     if (ActiveState != null)
     {
         ActiveState.End();
     }
     ActiveState = state;
     ActiveState.Init();
 }
Esempio n. 3
0
    public void SetState(CameraState state)
    {
        if (currentState != null)
        {
            currentState.OnStateExit();
        }

        currentState = state;

        if (currentState != null)
        {
            currentState.Init();
            currentState.OnStateEnter();
        }
    }
Esempio n. 4
0
 void OnEnable()
 {
     m_TargetCameraState.Init(transform, targetPosition, distance, minPitch, maxPitch, minDistance, maxDistance);
     m_InterpolatingCameraState.Init(transform, targetPosition, distance, minPitch, maxPitch, minDistance, maxDistance);
 }