StoryE9P1.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using System;
  2. using System.Collections;
  3. using UnityEngine;
  4. public class StoryE9P1 : BaseBehaviour
  5. {
  6. private bool IsFirst
  7. {
  8. get
  9. {
  10. return RoundStorage.Get("E9_p1", true);
  11. }
  12. set
  13. {
  14. RoundStorage.Set("E9_p1", value);
  15. }
  16. }
  17. private bool IsE9BossDie
  18. {
  19. get
  20. {
  21. return RoundStorage.Get("E9_BossDie", false);
  22. }
  23. }
  24. public void OnTriggerEnter2D(Collider2D collision)
  25. {
  26. if (!collision.CompareTag("Player"))
  27. {
  28. return;
  29. }
  30. if (this.IsFirst)
  31. {
  32. this.IsFirst = false;
  33. if (!this.IsE9BossDie)
  34. {
  35. base.StartCoroutine(this.Sequence0());
  36. }
  37. else
  38. {
  39. base.StartCoroutine(this.Sequence1());
  40. }
  41. }
  42. }
  43. private IEnumerator Sequence0()
  44. {
  45. yield return new WaitForSeconds(0.5f);
  46. R.Trophy.AwardTrophy(11);
  47. yield return R.Audio.PlayVoiceOver("e9t1", null, false);
  48. yield break;
  49. }
  50. private IEnumerator Sequence1()
  51. {
  52. yield return new WaitForSeconds(0.5f);
  53. yield return R.Audio.PlayVoiceOver("e9t9", null, false);
  54. yield break;
  55. }
  56. }