GameGuide.cs 655 B

123456789101112131415161718192021222324252627282930313233343536
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class GameGuide : MonoBehaviour
  6. {
  7. private string texts = "请根据箭头所指方向去收集能量块";
  8. private float waitTime = 3f;
  9. private float timer = 0;
  10. private PlayerControl pc;
  11. public Text text;
  12. // Use this for initialization
  13. void Start()
  14. {
  15. StartCoroutine(tip());
  16. }
  17. // Update is called once per frame
  18. void Update()
  19. {
  20. }
  21. IEnumerator tip()
  22. {
  23. yield return new WaitForSeconds(waitTime);
  24. text.text = texts;
  25. }
  26. }