using System.Collections;
|
using System.Collections.Generic;
|
using UnityEngine;
|
using UnityEngine.UI;
|
|
public class TestButton : MonoBehaviour
|
{
|
// Start is called before the first frame update
|
void Start()
|
{
|
transform.Find("TowerBuyBtn").GetComponent<Button>().onClick.AddListener(OnClickTowerBuyBtn);
|
}
|
|
private void OnClickTowerBuyBtn(){
|
Debug.Log("点击了TowerBuyBtn");
|
}
|
}
|