_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/lianghaoLL/NumberTc.cs

40 lines
1.1 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
using UnityEngine.UI;
public class NumberTc : MonoBehaviour
{
public TextMeshProUGUI BeautifulNumber;
public TextMeshProUGUI price;
public Button Show_buy;
public Canvas jiemianCanvas;
public GameObject musk;
// Start is called before the first frame update
void Start()
{
jiemianCanvas = GameObject.Find("Canvas").GetComponent<Canvas>();
Show_buy.onClick.AddListener(ShowBuy_TanChuang);
}
void ShowBuy_TanChuang()
{
GameObject Buy_tc = (GameObject)Instantiate(Resources.Load("LLPrefabs/Nice_numberTcPanel"),jiemianCanvas.transform);
Text hfText = Buy_tc.transform.Find("Panel/t3/huafeitext").GetComponent<Text>();
hfText.text = "是否确认花费" + price.text + "个蜗壳购买ID为" + BeautifulNumber.text + "的靓号?";
Buy_tc.GetComponent<Nice_numPanel>().numberTc = this;
}
public void musk_show()
{
musk.gameObject.SetActive(true);
Show_buy.interactable = false;
}
// Update is called once per frame
void Update()
{
}
}