StoryE13P2.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. using System;
  2. using System.Collections;
  3. using I2.Loc;
  4. using UnityEngine;
  5. public class StoryE13P2 : BaseBehaviour
  6. {
  7. private void Start()
  8. {
  9. base.StartCoroutine(this.P2Coroutine());
  10. }
  11. private void Update()
  12. {
  13. }
  14. private IEnumerator P2Coroutine()
  15. {
  16. InputSetting.Stop(false);
  17. yield return new WaitForSeconds(2f);
  18. base.StartCoroutine(this.RunCotoutine());
  19. yield return R.Audio.PlayVoiceOver("e13t9", null, false);
  20. yield return R.Ui.HideUI(false);
  21. this.white.SetActive(true);
  22. R.Audio.PlayEffect(361, new Vector3?(R.Player.Transform.position));
  23. yield return R.Audio.PlayVoiceOver("e13t10", null, false);
  24. R.Player.RoleName = "UCEY";
  25. yield return new WaitForSeconds(5f);
  26. yield return R.Audio.PlayVoiceOver("e13t11", null, false);
  27. R.Ui.BlackScene.Alpha = 1f;
  28. yield return R.Audio.PlayVoiceOver("e13t12", null, false);
  29. R.Ui.BlackScene.Alpha = 0f;
  30. yield return R.Ui.Terminal.OpenWithAnim(null);
  31. yield return new WaitForSeconds(1f);
  32. yield return R.Ui.Terminal.Println(ScriptLocalization.Story.e13s1, 0.1f);
  33. yield return R.Ui.Terminal.ShowProgressBar(0f);
  34. yield return R.Ui.Terminal.SetProgressBarValueWithAnim(1f, 3f);
  35. yield return new WaitForSeconds(1f);
  36. yield return R.Ui.Terminal.HideProgressBar();
  37. yield return R.Ui.Terminal.CloseWithAnim();
  38. R.Ui.BlackScene.Alpha = 1f;
  39. this.gate.Enter(false);
  40. yield break;
  41. }
  42. private IEnumerator RunCotoutine()
  43. {
  44. R.Player.ActionController.StartMove();
  45. while (R.Player.Transform.position.x - this.stopPoint.position.x < 0f)
  46. {
  47. yield return null;
  48. }
  49. R.Player.ActionController.StopMove();
  50. yield break;
  51. }
  52. [SerializeField]
  53. private Transform stopPoint;
  54. [SerializeField]
  55. private GameObject white;
  56. [SerializeField]
  57. private SceneGate gate;
  58. }