public void LookPos(Vector3 pos, CameraDefine.CameraMoveDoneCallback onCameraMoveDone, float fDuration)
 {
     if (m_ThirdPersonCamera == null)
     {
         return;
     }
     if (fDuration <= 0)
     {
         m_ThirdPersonCamera.m_StateStarePos.EnterState(pos);
         m_ThirdPersonCamera.SetState(m_ThirdPersonCamera.m_StateStarePos);
     }
     else
     {
         m_ThirdPersonCamera.m_StateChangeToStarePos.EnterState(pos, m_LastValidTargetPos, fDuration, CameraDefine.m_ChangeTargetEaseType2, onCameraMoveDone);
         m_ThirdPersonCamera.SetState(m_ThirdPersonCamera.m_StateChangeToStarePos);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// 只做初始状态转为StareTarget状态用
 /// </summary>
 /// <param name="target"></param>
 /// <param name="fDuration"></param>
 public void LookTarget(Obj target, CameraDefine.CameraMoveDoneCallback onCameraMoveDone, float fDuration)
 {
     if (m_ThirdPersonCamera == null || target == null)
     {
         Module.Log.LogModule.ErrorLog("Init CameraState Error,  target = {0}", target.ToString());
         return;
     }
     m_ThirdPersonCamera.m_StateStareTarget.EnterState(target);
     m_ThirdPersonCamera.SetState(m_ThirdPersonCamera.m_StateStareTarget);
 }