JTFalse.cs 341 B

1234567891011121314151617
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class JTFalse : MonoBehaviour
  5. {
  6. private void OnEnable()
  7. {
  8. StartCoroutine(MainFalse(5f));
  9. }
  10. IEnumerator MainFalse( float times)
  11. {
  12. yield return new WaitForSeconds(times);
  13. gameObject.SetActive(false);
  14. }
  15. }