2024-11-27 01:48:52 +08:00
|
|
|
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;
|
|
|
|
|
|
|
|
// Start is called before the first frame update
|
|
|
|
|
|
|
|
private void Awake()
|
|
|
|
{
|
|
|
|
instance = this;
|
2024-11-27 11:25:42 +08:00
|
|
|
//getInfo();
|
2024-11-27 01:48:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
async void getInfo()
|
|
|
|
{
|
|
|
|
await StartAsync();
|
|
|
|
Debug.Log(_realPlayerInfo.data.nickName);
|
|
|
|
Debug.Log(_realPlayerInfo.data.voluteCoin);
|
|
|
|
Debug.Log(_realPlayerInfo.data.beansCoin);
|
2024-11-27 01:56:41 +08:00
|
|
|
_mainBTN.UpDatePlayer(_realPlayerInfo.data.nickName, _realPlayerInfo.data.voluteCoin.ToString("f1")+"M", _realPlayerInfo.data.beansCoin.ToString("f1")+"M");
|
2024-11-27 01:48:52 +08:00
|
|
|
}
|
|
|
|
async Task StartAsync()
|
|
|
|
{
|
|
|
|
_realPlayerInfo = new RealPlayerInfo();
|
|
|
|
_queryPlayerInfo = new queryPlayerInfo();
|
|
|
|
|
|
|
|
_realPlayerInfo = await _queryPlayerInfo.QueryPlayerInfoPro();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|