StoryE5P8.cs 686 B

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using UnityEngine;
  3. public class StoryE5P8 : BaseBehaviour
  4. {
  5. private bool IsFirstTime
  6. {
  7. get
  8. {
  9. return RoundStorage.Get(LevelManager.SceneName + base.name, true);
  10. }
  11. set
  12. {
  13. RoundStorage.Set(LevelManager.SceneName + base.name, false || value);
  14. }
  15. }
  16. public void OnTriggerEnter2D(Collider2D collision)
  17. {
  18. if (this._isPlaying || !collision.CompareTag("Player") || !this.IsFirstTime)
  19. {
  20. return;
  21. }
  22. R.Audio.PlayVoiceOver("e5t8", null, false);
  23. this._guideBoard.SetActive(true);
  24. this._isPlaying = true;
  25. this.IsFirstTime = false;
  26. }
  27. private bool _isPlaying;
  28. [SerializeField]
  29. private GameObject _guideBoard;
  30. }