StoryE11P6.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. using System;
  2. using System.Collections;
  3. using UnityEngine;
  4. public class StoryE11P6 : BaseBehaviour
  5. {
  6. public static void OnShiPlayerDie()
  7. {
  8. StoryE11P6._deathTimes++;
  9. StoryE11P6.Trigger();
  10. }
  11. private static void Trigger()
  12. {
  13. switch (StoryE11P6._deathTimes)
  14. {
  15. case 1:
  16. R.Audio.PlayVoiceOver("e11t16", null, false);
  17. break;
  18. case 2:
  19. R.Audio.PlayVoiceOver("e11t17", null, false);
  20. break;
  21. case 3:
  22. R.Audio.PlayVoiceOver("e11t18", null, false);
  23. break;
  24. case 5:
  25. R.Coroutine.Start(StoryE11P6.Sequence0());
  26. break;
  27. case 10:
  28. R.Coroutine.Start(StoryE11P6.Sequence1());
  29. break;
  30. }
  31. }
  32. private static IEnumerator Sequence0()
  33. {
  34. R.Audio.PlayVoiceOver("e11t19", null, false);
  35. AudioSource audio = R.Audio.PlayEffect(353, null);
  36. while (audio.isPlaying)
  37. {
  38. yield return null;
  39. }
  40. R.Audio.PlayEffect(385, null);
  41. yield break;
  42. }
  43. private static IEnumerator Sequence1()
  44. {
  45. InputSetting.Stop(false);
  46. yield return R.Audio.PlayVoiceOver("e11t20", null, false);
  47. R.Ui.BlackScene.Alpha = 0f;
  48. R.Audio.StopBGM(false);
  49. yield return R.Audio.PlayVoiceOver("e11t21", null, false);
  50. R.Equipment.CoinNum += 100;
  51. InputSetting.Resume(false);
  52. R.Mode.ExitMode(Mode.AllMode.Shi);
  53. R.Ui.ShowUI(false);
  54. R.Ui.LevelSelect.OpenWithAnim(true, true);
  55. yield break;
  56. }
  57. private static int _deathTimes;
  58. }