StoryE9P5.cs 811 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. using UnityEngine;
  3. public class StoryE9P5 : BaseBehaviour
  4. {
  5. private bool IsE9P5FirstBossNotDie
  6. {
  7. get
  8. {
  9. return RoundStorage.Get("E9_P5FirstBossNotDie", true);
  10. }
  11. set
  12. {
  13. RoundStorage.Set("E9_P5FirstBossNotDie", value);
  14. }
  15. }
  16. private bool IsE9P4FirstBossNotDie
  17. {
  18. get
  19. {
  20. return RoundStorage.Get("E9_p4FirstBossNotDie", true);
  21. }
  22. }
  23. private bool IsE9BossDie
  24. {
  25. get
  26. {
  27. return RoundStorage.Get("E9_BossDie", false);
  28. }
  29. }
  30. public void OnTriggerEnter2D(Collider2D collision)
  31. {
  32. if (!collision.CompareTag("Player"))
  33. {
  34. return;
  35. }
  36. if (this.IsE9P5FirstBossNotDie && !this.IsE9BossDie && !this.IsE9P4FirstBossNotDie)
  37. {
  38. this.IsE9P5FirstBossNotDie = false;
  39. R.Audio.PlayVoiceOver("e9t8", null, false);
  40. }
  41. }
  42. }