CountDown.cs 269 B

1234567891011121314151617
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class CountDown : MonoBehaviour
  6. {
  7. private void OnEnable()
  8. {
  9. Invoke("Down", 1);
  10. }
  11. void Down()
  12. {
  13. Destroy(gameObject);
  14. }
  15. }