using System.Collections;

using System.Collections.Generic;

using UnityEngine;

using UnityEngine.UI;


public class button : MonoBehaviour

{

   // Start is called before the first frame update

   public Button btn;

   private float now_time;


   void Start()

   {

       btn.onClick.AddListener(() => { OnClickBtn(btn.gameObject); });

   }

   void OnClickBtn(GameObject Button)

   {

       Destroy(gameObject);

       Debug.Log("按钮被点击");

   }



   // Update is called once per frame

   void Update()

   {

       Destroy(gameObject,4.05f);

   }

}