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

40 lines
1.1 KiB
C#
Raw Normal View History

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;
2024-11-25 22:58:30 +08:00
public GameObject musk;
// Start is called before the first frame update
void Start()
{
2024-11-26 17:35:52 +08:00
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 = "<22>Ƿ<EFBFBD>ȷ<EFBFBD>ϻ<EFBFBD><CFBB><EFBFBD>" + price.text + "<22><><EFBFBD>Ͽǹ<CFBF><C7B9><EFBFBD>IDΪ" + BeautifulNumber.text + "<22><><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD>";
Buy_tc.GetComponent<Nice_numPanel>().numberTc = this;
}
public void musk_show()
{
musk.gameObject.SetActive(true);
2024-11-26 00:41:57 +08:00
Show_buy.interactable = false;
}
// Update is called once per frame
void Update()
{
}
}