showTip.cs 264 B

123456789101112131415
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class showTip : MonoBehaviour
  5. {
  6. private void OnEnable() {
  7. Invoke("close",2f);
  8. }
  9. public void close()
  10. {
  11. this.gameObject.SetActive(false);
  12. }
  13. }