StartZhongKong.cs 480 B

12345678910111213141516171819202122
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class StartZhongKong : MonoBehaviour
  5. {
  6. // Use this for initialization
  7. public GameObject showGame;
  8. public float showTimer;
  9. void Start()
  10. {
  11. StartCoroutine(Show(showTimer));
  12. }
  13. private IEnumerator Show(float timer)
  14. {
  15. yield return new WaitForSeconds(timer);
  16. showGame.SetActive(true);
  17. this.gameObject.SetActive(false);
  18. }
  19. }