62 lines
1.5 KiB
C#
62 lines
1.5 KiB
C#
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;
|
|
|
|
//用户信息
|
|
private RealPlayerInfo _realPlayerInfo;//用户信息结构体
|
|
private queryPlayerInfo _queryPlayerInfo;//用户信息
|
|
|
|
|
|
//商城信息
|
|
public MallResponsePro _mallResponsePro;//商城列表结构体
|
|
private getMallList21 _getMallList21;//商城列表获取方法
|
|
|
|
|
|
// Start is called before the first frame update
|
|
|
|
private void Awake()
|
|
{
|
|
instance = this;
|
|
|
|
//testLogo();
|
|
getPlayerInfo();
|
|
// getShopInfo();
|
|
}
|
|
|
|
|
|
async void getPlayerInfo()
|
|
{
|
|
await PlayerInfoAsync();
|
|
/*Debug.Log(_realPlayerInfo.data.nickName);
|
|
Debug.Log(_realPlayerInfo.data.voluteCoin);
|
|
Debug.Log(_realPlayerInfo.data.beansCoin);*/
|
|
_mainBTN.UpDatePlayer(_realPlayerInfo.data.nickName, _realPlayerInfo.data.voluteCoin.ToString("f1") + "M", _realPlayerInfo.data.beansCoin.ToString("f1") + "M");
|
|
}
|
|
|
|
async Task PlayerInfoAsync()
|
|
{
|
|
_realPlayerInfo = new RealPlayerInfo();
|
|
_queryPlayerInfo = new queryPlayerInfo();
|
|
_realPlayerInfo = await _queryPlayerInfo.QueryPlayerInfoPro();
|
|
}
|
|
|
|
|
|
|
|
public async Task ShopInfo()
|
|
{
|
|
_mallResponsePro = new MallResponsePro();
|
|
_getMallList21 = new getMallList21();
|
|
|
|
_mallResponsePro = await _getMallList21.getMallList(1, 1, 20);
|
|
|
|
}
|
|
|
|
|
|
}
|