예제 #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();
 }
예제 #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();
 }
예제 #3
0
    public void SetState(CameraState state)
    {
        if (currentState != null)
        {
            currentState.OnStateExit();
        }

        currentState = state;

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