1234567891011121314151617181920212223242526 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class NewJiantou : MonoBehaviour
- {
- public SCButton cButton;
- public TextMesh textMesh;
- // Start is called before the first frame update
- void Start()
- {
- cButton.onClick.AddListener(ClickOnBtn);
- }
- public void Init(int num)
- {
- textMesh.text = num.ToString();
- }
- private void ClickOnBtn()
- {
- Destroy(gameObject);
- }
- }
|