StoryE23P6.cs 729 B

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using System.Collections;
  3. using I2.Loc;
  4. using UnityEngine;
  5. public class StoryE23P6 : BaseBehaviour
  6. {
  7. private void Update()
  8. {
  9. if (this.isFirst && Mathf.Abs(R.Player.Transform.position.x - base.transform.position.x) < 1f)
  10. {
  11. this.isFirst = false;
  12. base.StartCoroutine(this.Sequence0());
  13. }
  14. }
  15. private void OnDestroy()
  16. {
  17. if (!SingletonMono<UIController>.ApplicationIsQuitting)
  18. {
  19. R.Ui.Tutorial.Hide(null);
  20. }
  21. }
  22. private IEnumerator Sequence0()
  23. {
  24. yield return R.Ui.Tutorial.Show(ScriptLocalization.mobile_tutorial.jumpAcross);
  25. yield return new WaitForSeconds(5f);
  26. yield return R.Ui.Tutorial.Hide(null);
  27. yield break;
  28. }
  29. private bool isFirst = true;
  30. }