StoryE2P9.cs 575 B

123456789101112131415161718192021222324252627282930313233343536
  1. using System;
  2. using UnityEngine;
  3. public class StoryE2P9 : BaseBehaviour
  4. {
  5. private static bool IsFirstE2P9
  6. {
  7. get
  8. {
  9. return RoundStorage.Get("E2_p9", true);
  10. }
  11. set
  12. {
  13. RoundStorage.Set("E2_p9", value);
  14. }
  15. }
  16. private void Start()
  17. {
  18. }
  19. private void Update()
  20. {
  21. }
  22. public void OnTriggerEnter2D(Collider2D collision)
  23. {
  24. if (!collision.CompareTag("Player") || !StoryE2P9.IsFirstE2P9)
  25. {
  26. return;
  27. }
  28. StoryE2P9.IsFirstE2P9 = false;
  29. R.Audio.PlayVoiceOver("e2t12", null, false);
  30. R.Audio.PlayEffect(375, null);
  31. }
  32. }