DummyVRCamera.cs 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  1. using System;
  2. using UnityEngine;
  3. public class DummyVRCamera : OvrCamera
  4. {
  5. public override bool IsNoHandController
  6. {
  7. get
  8. {
  9. return true;
  10. }
  11. }
  12. protected override void Awake()
  13. {
  14. this.m_fDistanceRate = 1.4f;
  15. this.m_trRealHead = UTY.GetChildObject(base.gameObject, "Main Camera (head)", false).transform;
  16. this.m_goCenterEye = UTY.GetChildObject(base.gameObject, "Main Camera (head)/Main Camera (eye)", false);
  17. this.m_trCenterEye = this.m_goCenterEye.transform;
  18. this.m_camMain = this.m_goCenterEye.GetComponent<Camera>();
  19. this.m_FadeTargetCameraOVR = this.m_goCenterEye.GetComponent<ScreenOverlay>();
  20. this.m_BloomOVR = this.m_goCenterEye.GetComponent<Bloom>();
  21. this.m_fBloomDefIntensity = this.m_BloomOVR.bloomIntensity;
  22. this.m_trTarget = new GameObject("OVRCamTarget").transform;
  23. this.m_trTarget.SetParent(GameMain.Instance.transform, false);
  24. this.m_trVirtualMy = new GameObject("OVRCamMy").transform;
  25. this.m_trVirtualMy.SetParent(GameMain.Instance.transform, false);
  26. GameObject gameObject = UnityEngine.Object.Instantiate(Resources.Load("OVR/OvrHeadScale")) as GameObject;
  27. gameObject.SetActive(true);
  28. GameObject gameObject2 = GameObject.Find("SystemUI Root");
  29. gameObject.transform.SetParent(gameObject2.transform, false);
  30. this.m_labelHeadScale = gameObject.GetComponentInChildren<UILabel>();
  31. this.m_labelHeadScale.enabled = false;
  32. this.m_goOvrUiScreen = UTY.GetChildObject(this.m_trRealHead.gameObject, "UI", false);
  33. this.m_goOvrUiTablet = UTY.GetChildObject(base.gameObject, "Odogu_TabletPC", false);
  34. this.m_trOvrUiTablet = this.m_goOvrUiTablet.transform;
  35. this.m_OvrTablet = this.m_goOvrUiTablet.GetComponent<OvrTablet>();
  36. this.m_OvrTablet.Init(this.m_trRealHead.gameObject);
  37. Vignetting vignetting = base.gameObject.AddComponent<Vignetting>();
  38. vignetting.enabled = false;
  39. Camera component = base.gameObject.GetComponent<Camera>();
  40. component.enabled = false;
  41. this.m_trBaseHead = new GameObject("DummyVRCamBaseHead").transform;
  42. this.m_trBaseHead.SetParent(GameMain.Instance.transform, false);
  43. this.m_trCursorLaserHit = this.m_goOvrUiScreen.transform.Find("ovr_screen/hit");
  44. NDebug.Assert(this.m_trCursorLaserHit != null, "UI Cursor Hit オブジェクトが見つかりません。");
  45. float ovrViveCursorLaserHitScale = GameMain.Instance.CMSystem.OvrViveCursorLaserHitScale;
  46. this.m_trCursorLaserHit.localScale = new Vector3(ovrViveCursorLaserHitScale, ovrViveCursorLaserHitScale, ovrViveCursorLaserHitScale);
  47. this.m_VREvnetText = this.m_trRealHead.Find("VREventText").GetComponent<VREventText>();
  48. Texture2D texture2D = Resources.Load<Texture2D>("System/Texture/black");
  49. SteamVR_Skybox.SetOverride(texture2D, texture2D, texture2D, texture2D, texture2D, texture2D);
  50. Transform transform = base.transform.Find("Controller (left)");
  51. Transform transform2 = base.transform.Find("Controller (right)");
  52. this.m_VRCtrlLeft = transform.GetComponent<DummyVRController>();
  53. this.m_VRCtrlLeft.Init();
  54. this.m_VRCtrlRight = transform2.GetComponent<DummyVRController>();
  55. this.m_VRCtrlRight.Init();
  56. Transform transform3 = this.m_trRealHead.Find("EyeRayCaster");
  57. this.m_EyeRay = transform3.GetComponent<OvrEyeRay>();
  58. NDebug.Assert(this.m_EyeRay != null, "視線検出機構がみつかりません。");
  59. this.m_DummyHand = base.transform.Find("HandPlayer").GetComponent<DummyVRHandAnimator>();
  60. NDebug.Assert(this.m_DummyHand != null, "HandPlayer が見つかりません。");
  61. this.m_DummyHand.gameObject.SetActive(false);
  62. this.UpdateHeadScale();
  63. this.m_bWheelToZoom = true;
  64. }
  65. public override void Start()
  66. {
  67. this.m_goOvrUiScreen.SetActive(false);
  68. this.m_goOvrUiTablet.SetActive(true);
  69. this.m_goOvrUiNow = this.m_goOvrUiTablet;
  70. this.ReCallcOffset();
  71. }
  72. public override void ChangeControllerNew(bool f_bNew)
  73. {
  74. }
  75. public override void DefaultControllerMode(bool f_bEnable)
  76. {
  77. }
  78. public override void ReCallcOffset()
  79. {
  80. }
  81. public override void OnLevelWasLoaded(int level)
  82. {
  83. base.OnLevelWasLoaded(level);
  84. this.m_bDummyYotogiCamera = this.m_bIsSceneYotogi;
  85. this.m_bIsSceneYotogi = false;
  86. }
  87. public override void SetCameraMask(CameraMain.CameraMask f_eMask, bool f_bVisible)
  88. {
  89. if (f_bVisible)
  90. {
  91. }
  92. }
  93. public override void CameraMaskReset()
  94. {
  95. }
  96. public override void SetCameraType(CameraMain.CameraType f_eType)
  97. {
  98. }
  99. public override CameraMain.CameraType GetCameraType()
  100. {
  101. return CameraMain.CameraType.Free;
  102. }
  103. public override void SetControl(bool f_bEnable)
  104. {
  105. }
  106. public override bool GetControl()
  107. {
  108. return true;
  109. }
  110. public override void SetTargetPos(Vector3 f_vecWorldPos, bool f_bSelf = true)
  111. {
  112. if (f_bSelf)
  113. {
  114. iTween.StopAndSkipToEnd(base.gameObject);
  115. }
  116. this.m_trTarget.position = f_vecWorldPos;
  117. this.SetTransform(this.m_trTarget.position, this.m_vRot, this.m_fDistance);
  118. }
  119. public override Vector3 GetTargetPos()
  120. {
  121. return this.m_trTarget.position;
  122. }
  123. public override void SetDistance(float f_fDistance, bool f_bSelf = true)
  124. {
  125. if (f_bSelf)
  126. {
  127. iTween.StopAndSkipToEnd(base.gameObject);
  128. }
  129. this.m_fDistance = f_fDistance;
  130. this.SetTransform(this.m_trTarget.position, this.m_vRot, this.m_fDistance);
  131. }
  132. public override float GetDistance()
  133. {
  134. return this.m_fDistance;
  135. }
  136. public override void SetAroundAngle(Vector2 f_vecAngle, bool f_bSelf = true)
  137. {
  138. if (f_bSelf)
  139. {
  140. iTween.StopAndSkipToEnd(base.gameObject);
  141. }
  142. this.SetTransform(this.m_trTarget.position, f_vecAngle, this.m_fDistance);
  143. }
  144. public override Vector2 GetAroundAngle()
  145. {
  146. return this.m_vRot;
  147. }
  148. public override void SetTargetOffset(Vector3 f_vOffs, bool f_bSelf = true)
  149. {
  150. }
  151. public override Vector3 GetPos()
  152. {
  153. return this.m_trBaseHead.position;
  154. }
  155. public override void SetRealHeadPos(Vector3 f_vecWorldPos, bool f_bYFromFloor = false)
  156. {
  157. if (f_bYFromFloor)
  158. {
  159. f_vecWorldPos.y = this.GetYfromFloor(f_vecWorldPos);
  160. }
  161. this.m_trBaseHead.position = f_vecWorldPos;
  162. this.UpdateRealPosRot();
  163. }
  164. public override void SetRealHeadRot(Vector3 f_vecWorldRot, bool f_bRotYOnly = true)
  165. {
  166. Transform realHeadTransform = this.GetRealHeadTransform();
  167. this.m_trBaseHead.position = realHeadTransform.position;
  168. if (f_bRotYOnly)
  169. {
  170. this.m_trBaseHead.rotation = Quaternion.Euler(0f, realHeadTransform.rotation.eulerAngles.y, 0f);
  171. }
  172. else
  173. {
  174. this.m_trBaseHead.rotation = Quaternion.Euler(f_vecWorldRot);
  175. }
  176. float num = f_vecWorldRot.y - realHeadTransform.rotation.eulerAngles.y;
  177. f_vecWorldRot.y = realHeadTransform.rotation.eulerAngles.y + num;
  178. this.m_trBaseHead.rotation = Quaternion.Euler(f_vecWorldRot);
  179. this.UpdateRealPosRot();
  180. }
  181. public override void SetFootPos(Vector3 f_vecFootPos, CameraMain.STAND_SIT f_eState)
  182. {
  183. if (f_eState == CameraMain.STAND_SIT.STAND)
  184. {
  185. f_vecFootPos.y += GameMain.Instance.CMSystem.VRCameraHeightStandOffs;
  186. }
  187. else if (f_eState == CameraMain.STAND_SIT.SIT)
  188. {
  189. f_vecFootPos.y += GameMain.Instance.CMSystem.VRCameraHeightSitOffs;
  190. }
  191. else
  192. {
  193. f_vecFootPos.y += this.GetYfromFloor(this.GetRealHeadTransform().position);
  194. }
  195. this.SetRealHeadPos(f_vecFootPos, false);
  196. }
  197. public override Transform GetBaseHeadTransform()
  198. {
  199. return this.m_trBaseHead;
  200. }
  201. public override Transform GetRealHeadTransform()
  202. {
  203. return this.m_trRealHead;
  204. }
  205. private void SetTransform(Vector3 f_vecTargetPosWorld, Vector2 f_vecRot, float f_fDistance)
  206. {
  207. this.m_trTarget.position = f_vecTargetPosWorld;
  208. this.m_vRot = f_vecRot;
  209. this.m_trVirtualMy.rotation = Quaternion.identity;
  210. this.m_trVirtualMy.Rotate(new Vector3(0f, f_vecRot.x, 0f), Space.World);
  211. this.m_trVirtualMy.Rotate(new Vector3(f_vecRot.y, 0f, 0f), Space.Self);
  212. if (this.m_bDummyYotogiCamera)
  213. {
  214. f_fDistance *= this.m_fDistanceRate;
  215. }
  216. this.m_trVirtualMy.position = this.m_trVirtualMy.rotation * new Vector3(0f, 0f, -f_fDistance) + this.m_trTarget.position;
  217. this.m_trBaseHead.position = this.m_trVirtualMy.position + (this.m_trTarget.position - this.m_trVirtualMy.position) * 0.5f;
  218. this.m_trBaseHead.rotation = this.m_trVirtualMy.rotation;
  219. this.UpdateRealPosRot();
  220. }
  221. public override void Reset(CameraMain.CameraType f_eType, bool f_bControl)
  222. {
  223. iTween.StopAndSkipToEnd(base.gameObject);
  224. base.RemoveChaseCameraAll();
  225. this.SetTargetPos(new Vector3(0f, 1.5f, 0f), true);
  226. }
  227. public override void FadeOutNoUI(float f_fTime = 0.5f, bool f_bSkipable = true)
  228. {
  229. }
  230. public override void FadeInNoUI(float f_fTime = 0.5f, bool f_bSkipable = true)
  231. {
  232. }
  233. protected override float GetFadeIntensity()
  234. {
  235. return this.m_FadeTargetCameraOVR.intensity;
  236. }
  237. protected override void OnProcessFade(float f_fIntensity)
  238. {
  239. this.m_FadeTargetCameraOVR.intensity = f_fIntensity;
  240. }
  241. protected override void OnOverlayState(bool f_bEnable)
  242. {
  243. this.m_FadeTargetCameraOVR.enabled = f_bEnable;
  244. }
  245. public override Ray GetForwardRay()
  246. {
  247. return new Ray(this.m_trCenterEye.position, this.m_trCenterEye.rotation * Vector3.forward);
  248. }
  249. public override void UpdateHeadScale()
  250. {
  251. float ovrHeadScale = GameMain.Instance.CMSystem.OvrHeadScale;
  252. base.gameObject.transform.localScale = new Vector3(ovrHeadScale, ovrHeadScale, ovrHeadScale);
  253. this.m_trBaseHead.localScale = base.gameObject.transform.localScale;
  254. }
  255. protected override void UpdateRealPosRot()
  256. {
  257. base.transform.position = this.m_trBaseHead.position;
  258. base.transform.rotation = this.m_trBaseHead.rotation;
  259. this.m_vHeadRotEaseBef = (this.m_vHeadRotEaseNow = (this.m_vHeadRotTarget = Vector2.zero));
  260. }
  261. public override void MirrorSwitch()
  262. {
  263. }
  264. public override void UIPosReset(float f_fOffsetRotY = 0f)
  265. {
  266. }
  267. protected override void Update()
  268. {
  269. if (GameMain.Instance == null)
  270. {
  271. return;
  272. }
  273. if (!base.IsUIShow)
  274. {
  275. UICamera.InputEnable = false;
  276. }
  277. if (this.m_DummyHand != null)
  278. {
  279. this.m_DummyHand.Show = (this.m_unDummyHandVisibleFlag != 0U);
  280. }
  281. if (this.m_BloomOVR != null)
  282. {
  283. bool enabled = this.m_BloomOVR.enabled;
  284. this.m_BloomOVR.enabled = GameMain.Instance.CMSystem.Bloom;
  285. this.m_BloomOVR.bloomIntensity = this.m_fBloomDefIntensity * (float)GameMain.Instance.CMSystem.BloomValue * 0.01f;
  286. if (this.m_BloomOVR.bloomIntensity <= 0.01f)
  287. {
  288. this.m_BloomOVR.enabled = false;
  289. }
  290. else
  291. {
  292. this.m_BloomOVR.enabled = true;
  293. }
  294. if (base.IsUIShow)
  295. {
  296. this.m_BloomOVR.enabled = false;
  297. }
  298. if (this.m_BloomOVR.enabled != enabled)
  299. {
  300. GameMain.Instance.BroadcastMessage("OnChangeScreenSizeOrAA", SendMessageOptions.DontRequireReceiver);
  301. }
  302. }
  303. float vrcameraFov = GameMain.Instance.CMSystem.VRCameraFov;
  304. if (this.m_fBackFOV != vrcameraFov)
  305. {
  306. this.m_camMain.fieldOfView = vrcameraFov;
  307. float num = (vrcameraFov - 30f) / 30f;
  308. float num2 = 0.23f + 0.17f * num;
  309. this.m_VREvnetText.gameObject.transform.localScale = new Vector3(num2, num2, num2);
  310. this.m_fBackFOV = vrcameraFov;
  311. }
  312. RaycastHit raycastHit;
  313. if (Physics.Raycast(this.m_camMain.ScreenPointToRay(Input.mousePosition), out raycastHit, float.PositiveInfinity, 33554432))
  314. {
  315. Vector2 textureCoord = raycastHit.textureCoord;
  316. Vector2 v = new Vector2(1280f * (textureCoord.x / 1f), 720f * (textureCoord.y / 1f));
  317. GameMain.Instance.OvrMgr.SystemUICamera.SetOvrVirtualMousePos(false, v);
  318. }
  319. this.m_bSlideMoving = false;
  320. this.vFowerd = this.m_trCenterEye.rotation * Vector3.forward;
  321. this.vLeft = this.m_trCenterEye.rotation * Vector3.left;
  322. this.vUp = this.m_trCenterEye.rotation * Vector3.up;
  323. if (GameMain.Instance.CMSystem.VRCameraPlaneMove)
  324. {
  325. this.vLeft.y = (this.vFowerd.y = 0f);
  326. this.vLeft.Normalize();
  327. this.vFowerd.Normalize();
  328. this.vUp = Vector3.up;
  329. }
  330. this.v = this.m_trBaseHead.position;
  331. if (this.m_bFallThrough || !this.m_bUiToggle)
  332. {
  333. if (this.m_bWheelToZoom && !base.IsUIShow)
  334. {
  335. this.v += this.vFowerd * (NInput.GetAxis(this.mouseAxisZoom) * (this.m_MoveSpeed * 10f * Time.deltaTime));
  336. }
  337. if (NInput.GetMouseButton(2))
  338. {
  339. Vector3 vector = new Vector3(-NInput.GetAxis(this.mouseAxisX), -NInput.GetAxis(this.mouseAxisY), 0f);
  340. this.v += this.vLeft * (vector.x * this.m_MoveSpeed * Time.deltaTime);
  341. this.v -= this.vUp * (vector.y * this.m_MoveSpeed * Time.deltaTime);
  342. this.m_bSlideMoving = true;
  343. }
  344. if (NInput.GetMouseButton(1))
  345. {
  346. }
  347. }
  348. if (NInput.GetMouseButton(1))
  349. {
  350. this.vMouseMoving += new Vector2(Math.Abs(NInput.GetAxis("Mouse X")), Math.Abs(NInput.GetAxis("Mouse Y")));
  351. }
  352. else
  353. {
  354. if ((this.m_bFallThrough || this.m_bIsForceRightClickUiToggle) && NInput.GetMouseButtonUp(1) && this.vMouseMoving.magnitude < 3f && this.m_bRightClickUIToggle)
  355. {
  356. this.ToggleUI();
  357. }
  358. this.vMouseMoving = Vector2.zero;
  359. }
  360. if (GameMain.Instance.MainCamera.GetFadeState() != CameraMain.FadeState.Out)
  361. {
  362. if (Input.GetKey(KeyCode.A))
  363. {
  364. this.v += this.vLeft * (this.m_MoveSpeed * base.MoveSpeedAccel * this.MoveDashRate(KeyCode.A) * Time.deltaTime);
  365. }
  366. if (Input.GetKey(KeyCode.D))
  367. {
  368. this.v -= this.vLeft * (this.m_MoveSpeed * base.MoveSpeedAccel * this.MoveDashRate(KeyCode.D) * Time.deltaTime);
  369. }
  370. if (Input.GetKey(KeyCode.W))
  371. {
  372. this.v += this.vFowerd * (this.m_MoveSpeed * base.MoveSpeedAccel * this.MoveDashRate(KeyCode.W) * Time.deltaTime);
  373. }
  374. if (!Input.GetKey(KeyCode.LeftShift) && !Input.GetKey(KeyCode.LeftAlt) && Input.GetKey(KeyCode.S))
  375. {
  376. this.v -= this.vFowerd * (this.m_MoveSpeed * base.MoveSpeedAccel * this.MoveDashRate(KeyCode.S) * Time.deltaTime);
  377. }
  378. if (Input.GetKey(KeyCode.Z))
  379. {
  380. this.v -= this.vUp * (this.m_MoveSpeed * base.MoveSpeedAccel * Time.deltaTime);
  381. }
  382. if (Input.GetKey(KeyCode.X))
  383. {
  384. this.v += this.vUp * (this.m_MoveSpeed * base.MoveSpeedAccel * Time.deltaTime);
  385. }
  386. if (this.HandLimitMode != AVRControllerBehavior.LIMIT_MODE.HAND_ONLY)
  387. {
  388. this.m_trBaseHead.position = this.v;
  389. }
  390. if (Input.GetKey(KeyCode.Q))
  391. {
  392. this.m_trBaseHead.Rotate(new Vector3(0f, 1f, 0f), -90f * base.RotSpeedAccel * Time.deltaTime, Space.World);
  393. }
  394. if (Input.GetKey(KeyCode.E))
  395. {
  396. this.m_trBaseHead.Rotate(new Vector3(0f, 1f, 0f), 90f * base.RotSpeedAccel * Time.deltaTime, Space.World);
  397. }
  398. if (!base.IsUIShow && !this.m_bSlideMoving && 0f <= Input.mousePosition.x && Input.mousePosition.x < (float)Screen.width && 0f <= Input.mousePosition.y && Input.mousePosition.y < (float)Screen.height && (NInput.InputUseLegacyAxisMode || (Cursor.lockState == CursorLockMode.Locked && !Cursor.visible)) && !base.IsFadeOut())
  399. {
  400. this.m_vHeadRotTarget.x = this.m_vHeadRotTarget.x - NInput.GetAxis("Mouse Y") * this.m_fHeadRotSpeed * base.RotMouseSpeedAccel;
  401. this.m_vHeadRotTarget.y = this.m_vHeadRotTarget.y + NInput.GetAxis("Mouse X") * this.m_fHeadRotSpeed * base.RotMouseSpeedAccel;
  402. this.m_trBaseHead.Rotate(new Vector3(0f, 1f, 0f), this.m_vHeadRotTarget.y - this.m_vHeadRotEaseBef.y, Space.World);
  403. float d = 1f;
  404. if (GameMain.Instance.CMSystem.VRCamRotDownUp)
  405. {
  406. d = -1f;
  407. }
  408. this.m_trBaseHead.Rotate(this.m_trBaseHead.right * d, this.m_vHeadRotTarget.x - this.m_vHeadRotEaseBef.x, Space.World);
  409. this.m_vHeadRotEaseBef = this.m_vHeadRotTarget;
  410. }
  411. else
  412. {
  413. this.m_vHeadRotEaseBef = (this.m_vHeadRotEaseNow = (this.m_vHeadRotTarget = Vector2.zero));
  414. }
  415. }
  416. else
  417. {
  418. this.m_vHeadRotEaseBef = (this.m_vHeadRotEaseNow = (this.m_vHeadRotTarget = Vector2.zero));
  419. }
  420. if (Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.SysReq))
  421. {
  422. if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift))
  423. {
  424. this.SnapShotOVR(false);
  425. }
  426. else if (Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt))
  427. {
  428. this.SnapShotOVR(true);
  429. }
  430. }
  431. if (Input.GetKeyUp(KeyCode.R))
  432. {
  433. this.ReCallcOffset();
  434. }
  435. if (Input.GetKeyUp(KeyCode.Space))
  436. {
  437. this.ToggleUI();
  438. }
  439. if (base.IsUIShow)
  440. {
  441. Cursor.visible = true;
  442. Cursor.lockState = CursorLockMode.None;
  443. }
  444. else if (this.m_bUiShowBack)
  445. {
  446. Cursor.visible = false;
  447. Cursor.lockState = CursorLockMode.Locked;
  448. }
  449. else
  450. {
  451. if (Input.GetKeyUp(KeyCode.Escape))
  452. {
  453. Cursor.visible = true;
  454. Cursor.lockState = CursorLockMode.None;
  455. }
  456. if (NInput.GetMouseButtonUp(0) && 0f <= Input.mousePosition.x && Input.mousePosition.x < (float)Screen.width && 0f <= Input.mousePosition.y && Input.mousePosition.y < (float)Screen.height)
  457. {
  458. Cursor.visible = false;
  459. Cursor.lockState = CursorLockMode.Locked;
  460. }
  461. }
  462. base.transform.position = this.m_trBaseHead.position;
  463. base.transform.rotation = this.m_trBaseHead.rotation;
  464. this.CheckSwitchManHeadEnable(this.m_trRealHead.position);
  465. this.m_bUiShowBack = base.IsUIShow;
  466. }
  467. private void OnDrawGizmos()
  468. {
  469. if (this.m_trTarget != null)
  470. {
  471. Gizmos.DrawIcon(this.m_trTarget.position, "gizmo_eye.png", true);
  472. if (base.enabled)
  473. {
  474. Gizmos.color = Color.cyan;
  475. Gizmos.DrawRay(this.m_trVirtualMy.position, this.m_trTarget.position - this.m_trVirtualMy.position);
  476. Gizmos.DrawRay(this.m_trCenterEye.position, this.m_trCenterEye.rotation * Vector3.forward * 10f);
  477. }
  478. }
  479. }
  480. private Vector2 m_vHeadRotEaseNow = Vector2.zero;
  481. private Vector2 m_vHeadRotEaseBef = Vector2.zero;
  482. public float m_fHeadRotSpeed = 1.5f;
  483. public float m_fHeadRotEase = 0.5f;
  484. private Vector2 m_vHeadRotTarget = Vector2.zero;
  485. public float m_fDistanceRate = 1.4f;
  486. private ScreenOverlay m_Fade;
  487. private Camera m_camMain;
  488. private float m_fBackFOV;
  489. private bool m_bDummyYotogiCamera;
  490. private enum MouseButtonDown
  491. {
  492. MBD_LEFT,
  493. MBD_RIGHT,
  494. MBD_MIDDLE
  495. }
  496. }