// CameraFilter class factory: public static CameraFilter CreateFilter(eCameraMode cameraMode) { switch (cameraMode) { case eCameraMode.Normal: return(new CameraFilterNormal()); case eCameraMode.DockingCam: return(new CameraFilterDockingCam()); case eCameraMode.BlackAndWhiteFilm: return(new CameraFilterBlackAndWhiteFilm()); case eCameraMode.BlackAndWhiteLoResTV: return(new CameraFilterBlackAndWhiteLoResTV()); case eCameraMode.BlackAndWhiteHiResTV: return(new CameraFilterBlackAndWhiteHiResTV()); case eCameraMode.ColorFilm: return(new CameraFilterColorFilm()); case eCameraMode.ColorLoResTV: return(new CameraFilterColorLoResTV()); case eCameraMode.ColorHiResTV: return(new CameraFilterColorHiResTV()); case eCameraMode.NightVision: return(new CameraFilterNightVision()); } return(null); }
private IEnumerator SetTargetAfterDelay(Transform target, float delay) { yield return(new WaitForSeconds(delay)); // change camera back m_CameraMode = eCameraMode.Free; m_LerpSpeed = 1f; m_Target = target; }
private void OnDoorOpened(GameEvents.DoorOpenedEvent e) { // adjust camera settings for quick movement m_CameraMode = eCameraMode.Static; m_LerpSpeed = Time.deltaTime * 0.25f; m_Target = e.DoorTransform; StartCoroutine(SetTargetAfterDelay(m_PlayerTransform, 3f)); }
/// <summary> /// @brief 視点の変更時に呼ぶメソッド ///</summary> /// <param name="cameraMode">変更したい視点</param> public void ChangeCameraAngle(eCameraMode cameraMode) { if (Singleton <ShipStates> .Instance.CameraMode == eCameraMode.TPS) { Camera.main.cullingMask |= layerMaskShip; // 表示 shipCamera.transform.SetPosY(7); shipCamera.transform.SetPosZ(69); } if (Singleton <ShipStates> .Instance.CameraMode == eCameraMode.GOAL) { Camera.main.cullingMask |= layerMaskShip; // 表示 shipCamera.transform.SetPosX(-3); shipCamera.transform.SetPosY(2); shipCamera.transform.SetPosZ(-5); shipCamera.transform.LookAt(ship.transform); // ゴール用カメラだけに使う固定用position cameraOffset = transform.position - ship.transform.position; } }
// CameraFilter class factory: public static CameraFilter CreateFilter(eCameraMode cameraMode) { switch (cameraMode) { case eCameraMode.Normal: return new CameraFilterNormal(); case eCameraMode.SepiaFilm: return new CameraFilterSepiaFilm(); case eCameraMode.BlackAndWhiteFilm: return new CameraFilterBlackAndWhiteFilm(); case eCameraMode.BlackAndWhiteLoResTV: return new CameraFilterBlackAndWhiteLoResTV(); case eCameraMode.BlackAndWhiteHiResTV: return new CameraFilterBlackAndWhiteHiResTV(); case eCameraMode.ColorFilm: return new CameraFilterColorFilm(); case eCameraMode.ColorLoResTV: return new CameraFilterColorLoResTV(); case eCameraMode.ColorHiResTV: return new CameraFilterColorHiResTV(); case eCameraMode.NightVision: return new CameraFilterNightVision(); } return null; }
public void ChangeMode(eCameraMode mode) { m_CameraMode = mode; }