StoryE9P3.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. using System;
  2. using UnityEngine;
  3. [RequireComponent(typeof(BoxCollider2D))]
  4. public class StoryE9P3 : BaseBehaviour
  5. {
  6. private bool IsE9P3FirstBossNotDie
  7. {
  8. get
  9. {
  10. return RoundStorage.Get("E9_P3BossNotDie", true);
  11. }
  12. set
  13. {
  14. RoundStorage.Set("E9_P3BossNotDie", value);
  15. }
  16. }
  17. private bool IsE9P3FirstBossDie
  18. {
  19. get
  20. {
  21. return RoundStorage.Get("E9_P3BossDie", true);
  22. }
  23. set
  24. {
  25. RoundStorage.Set("E9_P3BossDie", value);
  26. }
  27. }
  28. private bool IsE9P4FirstBossNotDie
  29. {
  30. get
  31. {
  32. return RoundStorage.Get("E9_p4FirstBossNotDie", true);
  33. }
  34. }
  35. private bool IsE9BossDie
  36. {
  37. get
  38. {
  39. return RoundStorage.Get("E9_BossDie", false);
  40. }
  41. }
  42. public void OnTriggerEnter2D(Collider2D collision)
  43. {
  44. if (!collision.CompareTag("Player"))
  45. {
  46. return;
  47. }
  48. if (this.IsE9P3FirstBossNotDie && !this.IsE9BossDie)
  49. {
  50. this.IsE9P3FirstBossNotDie = false;
  51. R.Audio.PlayVoiceOver((!this.IsE9P4FirstBossNotDie) ? "e9t10" : "e9t4", null, false);
  52. }
  53. if (this.IsE9P3FirstBossDie && this.IsE9BossDie)
  54. {
  55. this.IsE9P3FirstBossDie = false;
  56. R.Audio.PlayVoiceOver("e9t5", null, false);
  57. }
  58. }
  59. }