StoryE13P3.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using System;
  2. using System.Collections;
  3. using ExtensionMethods;
  4. using UnityEngine;
  5. public class StoryE13P3 : BaseBehaviour
  6. {
  7. private void Start()
  8. {
  9. base.StartCoroutine(this.P3Coroutine());
  10. }
  11. private IEnumerator P3Coroutine()
  12. {
  13. this.ucey = UnityEngine.Object.Instantiate<GameObject>(this.uceyPrefab, this.uceyPos.position.SetZ(LayerManager.ZNum.MMiddleE(EnemyAttribute.RankType.Normal)), Quaternion.identity);
  14. AirRobotAction action = this.ucey.GetComponent<AirRobotAction>();
  15. action.ChangeFace(1);
  16. R.Player.ActionController.ChangeState(PlayerAction.StateEnum.Disappear);
  17. yield return R.Audio.PlayVoiceOver("e13t13", null, false);
  18. YieldInstruction voiceOverT14 = R.Audio.PlayVoiceOver("e13t14", null, false);
  19. R.Camera.Controller.CameraZoom(this.uceyPos.position + Vector3.up * 4f, 5f, 6f);
  20. yield return voiceOverT14;
  21. yield return R.Audio.PlayVoiceOver("e13t15", null, false);
  22. yield return R.Ui.BlackScene.FadeBlack(0.3f, false);
  23. R.Camera.Controller.CameraZoomFinished();
  24. R.Camera.Controller.Pivot = this.ucey.transform;
  25. yield return new WaitForSeconds(1f);
  26. yield return R.Ui.BlackScene.FadeTransparent(0.3f, false);
  27. YieldInstruction voiceOverT15 = R.Audio.PlayVoiceOver("e13t16", null, false);
  28. action.AutoMove();
  29. while (this.ucey.transform.position.x - this.gate.position.x < 0f)
  30. {
  31. action.AutoMove();
  32. yield return null;
  33. }
  34. yield return voiceOverT15;
  35. UnityEngine.Object.DontDestroyOnLoad(this.ucey);
  36. this.gateToS12.Enter(false);
  37. yield break;
  38. }
  39. private GameObject ucey;
  40. [SerializeField]
  41. private GameObject uceyPrefab;
  42. [SerializeField]
  43. private Transform _sceneSprites;
  44. [SerializeField]
  45. private Transform gate;
  46. [SerializeField]
  47. private SceneGate gateToS12;
  48. [SerializeField]
  49. private Transform uceyPos;
  50. }