StoryE5P7.cs 879 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using System;
  2. using System.Collections;
  3. using UnityEngine;
  4. public class StoryE5P7 : BaseBehaviour
  5. {
  6. private bool IsFirstTime
  7. {
  8. get
  9. {
  10. return RoundStorage.Get("E5_p7", true);
  11. }
  12. set
  13. {
  14. RoundStorage.Set("E5_p7", value);
  15. }
  16. }
  17. private void Start()
  18. {
  19. this._battleZoneGate.Appear();
  20. }
  21. public void OnTriggerEnter2D(Collider2D collision)
  22. {
  23. if (!collision.CompareTag("Player") || !this.IsFirstTime)
  24. {
  25. return;
  26. }
  27. this.IsFirstTime = false;
  28. base.StartCoroutine(this.Sequence0());
  29. }
  30. private IEnumerator Sequence0()
  31. {
  32. yield return R.Audio.PlayVoiceOver("e5t7", null, false);
  33. R.Audio.PlayEffect(353, null);
  34. this._battleZoneGate.DisAppear();
  35. this._e5p8.SetActive(true);
  36. yield break;
  37. }
  38. [SerializeField]
  39. private BattleZoneGate _battleZoneGate;
  40. [SerializeField]
  41. private GameObject _e5p8;
  42. }