_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/lianghaoLL/Nice_numPanel.cs
2024-11-27 19:05:53 +08:00

49 lines
1.1 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Nice_numPanel : Base
{
public Button CancleBtn;
public Button ConfirmBtn;
public NumberTc numberTc;
BuyGoodIdResponse buyGoodIdResponse = new BuyGoodIdResponse();
BuyGoodId42 buyGoodId42 = new BuyGoodId42();
// Start is called before the first frame update
void Start()
{
CancleBtn.onClick.AddListener(CanclePanel);
ConfirmBtn.onClick.AddListener(ConfirmBuy);
}
void CanclePanel()
{
Destroy(this.gameObject);
}
async void ConfirmBuy()
{
//string pricetext = numberTc.price.text;
buyGoodIdResponse = await buyGoodId42.buyGoodId(numberTc.id);
Debug.Log(buyGoodIdResponse);
if (buyGoodIdResponse.code == 200)
{
numberTc.musk_show();
Destroy(this.gameObject);
}
else
{
addEventPopUp("µ¯³öÎϿDz»×ãµÄµ¯´°");
}
}
// Update is called once per frame
void Update()
{
}
}