_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/Scene_main/Scene_main_jiekou.cs

62 lines
1.5 KiB
C#
Raw Normal View History

using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using UnityEngine;
public class Scene_main_jiekou :Base
{
public static Scene_main_jiekou instance;
public mainBTN _mainBTN;
2024-11-27 22:22:41 +08:00
//<2F>û<EFBFBD><C3BB><EFBFBD>Ϣ
private RealPlayerInfo _realPlayerInfo;//<2F>û<EFBFBD><C3BB><EFBFBD>Ϣ<EFBFBD><EFBFBD><E1B9B9>
private queryPlayerInfo _queryPlayerInfo;//<2F>û<EFBFBD><C3BB><EFBFBD>Ϣ
//<2F>̳<EFBFBD><CCB3><EFBFBD>Ϣ
public MallResponsePro _mallResponsePro;//<2F>̳<EFBFBD><CCB3>б<EFBFBD><D0B1><EFBFBD><E1B9B9>
private getMallList21 _getMallList21;//<2F>̳<EFBFBD><CCB3>б<EFBFBD><D0B1><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
// Start is called before the first frame update
private void Awake()
{
instance = this;
2024-11-27 22:22:41 +08:00
2024-11-27 22:29:31 +08:00
//testLogo();
getPlayerInfo();
2024-11-27 22:22:41 +08:00
// getShopInfo();
}
2024-11-27 22:22:41 +08:00
async void getPlayerInfo()
{
2024-11-27 22:22:41 +08:00
await PlayerInfoAsync();
/*Debug.Log(_realPlayerInfo.data.nickName);
Debug.Log(_realPlayerInfo.data.voluteCoin);
2024-11-27 22:22:41 +08:00
Debug.Log(_realPlayerInfo.data.beansCoin);*/
_mainBTN.UpDatePlayer(_realPlayerInfo.data.nickName, _realPlayerInfo.data.voluteCoin.ToString("f1") + "M", _realPlayerInfo.data.beansCoin.ToString("f1") + "M");
}
2024-11-27 22:22:41 +08:00
async Task PlayerInfoAsync()
{
2024-11-27 22:22:41 +08:00
_realPlayerInfo = new RealPlayerInfo();
_queryPlayerInfo = new queryPlayerInfo();
_realPlayerInfo = await _queryPlayerInfo.QueryPlayerInfoPro();
}
2024-11-27 22:22:41 +08:00
public async Task ShopInfo()
{
_mallResponsePro = new MallResponsePro();
_getMallList21 = new getMallList21();
_mallResponsePro = await _getMallList21.getMallList(1, 1, 20);
}
}