xiubug
This commit is contained in:
parent
b292efafdd
commit
6649d55ab5
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,31 +1,33 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using DG.Tweening;
|
||||
using Unity.VisualScripting;
|
||||
|
||||
public class HeadTanchuang : MonoBehaviour
|
||||
{
|
||||
public GameObject AvatarPanel;
|
||||
public Button Avatarbtn;
|
||||
|
||||
|
||||
public RectTransform AvatarRect;
|
||||
|
||||
Vector3 Deflate = new Vector3(0.5f, 0.5f, 0.5f);
|
||||
|
||||
|
||||
|
||||
public Transform canvas;
|
||||
private void Awake()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Text Name;
|
||||
public Text Id;
|
||||
|
||||
public AssetsPanel _AssetsPanel;
|
||||
|
||||
void Start()
|
||||
{
|
||||
Avatarbtn.onClick.AddListener(Display_pop_up_window);
|
||||
AvatarPanel.gameObject.SetActive(false);
|
||||
|
||||
UpdateShow();
|
||||
}
|
||||
|
||||
private void Display_pop_up_window()
|
||||
@ -40,5 +42,11 @@ public class HeadTanchuang : MonoBehaviour
|
||||
AvatarPanel.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
async void UpdateShow()
|
||||
{
|
||||
await Task.Delay(100);
|
||||
|
||||
this.Name.text = _AssetsPanel._PlayerInfoData.nickname.ToString();
|
||||
this.Id.text = _AssetsPanel._PlayerInfoData.uid.ToString();
|
||||
}
|
||||
}
|
||||
|
@ -25,6 +25,10 @@ public class AssetsPanel : MonoBehaviour
|
||||
public Image UserHead;
|
||||
public Text PersonaText;
|
||||
public Text PersonID;
|
||||
|
||||
|
||||
|
||||
public PlayerInfoData _PlayerInfoData;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
@ -65,16 +69,11 @@ public class AssetsPanel : MonoBehaviour
|
||||
|
||||
async void UpdateTaxt()
|
||||
{
|
||||
PlayerInfoData info=await Scene_main_jiekou.instance.PlayerInfos();
|
||||
Stone.text = Scene_main_jiekou.instance.infoData.gem.ToString();
|
||||
Coin.text = Scene_main_jiekou.instance.infoData.gold.ToString();
|
||||
Ore.text = Scene_main_jiekou.instance.infoData.water.ToString();
|
||||
Forging.text = Scene_main_jiekou.instance.infoData.forge.ToString();
|
||||
UserName.text = Scene_main_jiekou.instance.infoData.nickname.ToString();
|
||||
PersonaText.text = Scene_main_jiekou.instance.infoData.nickname.ToString();
|
||||
UserID.text = Scene_main_jiekou.instance.infoData.uid.ToString();
|
||||
PersonID.text = Scene_main_jiekou.instance.infoData.uid.ToString();
|
||||
|
||||
_PlayerInfoData = await Scene_main_jiekou.instance.PlayerInfos();
|
||||
Stone.text = _PlayerInfoData.gem.ToString();
|
||||
Coin.text = _PlayerInfoData.gold.ToString();
|
||||
Ore.text = _PlayerInfoData.water.ToString();
|
||||
Forging.text = _PlayerInfoData.forge.ToString();
|
||||
}
|
||||
|
||||
|
||||
|
@ -7,11 +7,12 @@ public class ReviseName : mount
|
||||
{
|
||||
|
||||
public Button ReviseBtn;
|
||||
public Text RevisrText;
|
||||
public Text MainnameText;
|
||||
public Text NameText;
|
||||
public Text IdText;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
ReviseBtn.onClick.AddListener(ReviseClick);
|
||||
}
|
||||
|
||||
@ -38,8 +39,8 @@ public class ReviseName : mount
|
||||
if (issuccefful.code ==200)
|
||||
{
|
||||
Promptmgr.Instance.PromptBubble("修改昵称成功");
|
||||
RevisrText.text = issuccefful.data.nickname;
|
||||
MainnameText.text = issuccefful.data.nickname;
|
||||
NameText.text = issuccefful.data.nickname;
|
||||
//IdText.text = issuccefful.data.nickname;
|
||||
gameObject.GetComponent<input_box_pop_up_window>().destroy();
|
||||
}
|
||||
else
|
||||
@ -53,9 +54,10 @@ public class ReviseName : mount
|
||||
|
||||
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
public async void UpdateShow()
|
||||
{
|
||||
|
||||
PlayerInfoData info = await Scene_main_jiekou.instance.PlayerInfos();
|
||||
this.NameText.text = info.nickname.ToString();
|
||||
this.IdText.text = info.uid.ToString();
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ using UnityEngine;
|
||||
public class Scene_main_jiekou :MonoBehaviour
|
||||
{
|
||||
login _Login = new login();
|
||||
|
||||
treeInfo TreeInfoss = new treeInfo();
|
||||
treeTeamData teamData = new treeTeamData();
|
||||
treeFansList treeFansList = new treeFansList();
|
||||
@ -16,31 +17,34 @@ public class Scene_main_jiekou :MonoBehaviour
|
||||
cancellation cancellation = new cancellation();
|
||||
|
||||
public static Scene_main_jiekou instance;
|
||||
public PlayerInfoData infoData;
|
||||
|
||||
//public PlayerInfoData infoData;
|
||||
|
||||
public bool IsTaskLoging;
|
||||
|
||||
BillingStatistics _BillingStatistics = new BillingStatistics();
|
||||
incomeList _incomeList = new incomeList();
|
||||
public void Awake()
|
||||
public async void Awake()
|
||||
{
|
||||
instance=this;
|
||||
|
||||
IsTaskLoging = false;
|
||||
}
|
||||
public async void Start()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public async Task<PlayerInfoData> PlayerInfos()
|
||||
{
|
||||
await _Login.TastLogin();
|
||||
playerInfo playerInfo=new playerInfo();
|
||||
// Debug.Log("balabala"+ MyGlobal.global.loginResponse.Data.access_token);
|
||||
/*if (!IsTaskLoging)
|
||||
{
|
||||
|
||||
IsTaskLoging=true;
|
||||
}*/
|
||||
|
||||
//await _Login.TastLogin();
|
||||
|
||||
playerInfo playerInfo=new playerInfo();
|
||||
PlayerIndfo _PlayerIndfo = await playerInfo.PalyerInfo();
|
||||
infoData = _PlayerIndfo.Data;
|
||||
return _PlayerIndfo.Data;
|
||||
}
|
||||
|
||||
@ -93,7 +97,6 @@ public class Scene_main_jiekou :MonoBehaviour
|
||||
public async Task<billingStatisticsData> GetbillingStatisticsData(int type)
|
||||
{
|
||||
//await _Login.TastLogin();
|
||||
|
||||
billingStatisticsResponse info = await _BillingStatistics.billingStatistics(type);
|
||||
return info.Data;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ public class miner_jiekou : MonoBehaviour
|
||||
/// <returns></returns>
|
||||
public async Task<List<MinngConfigData>> GetMinerInfo(int index)
|
||||
{
|
||||
// await _Login.TastLogin();
|
||||
await _Login.TastLogin();
|
||||
|
||||
miningActivate go = new miningActivate();
|
||||
MiningConfigResponse info= await go.MiningConfig(index);
|
||||
|
@ -8,6 +8,8 @@ public class login : MonoBehaviour
|
||||
{
|
||||
public string token;
|
||||
checkAccount checkAccount = new checkAccount();
|
||||
|
||||
//private bool isTast;
|
||||
// 创建请求头,使用最新的 token
|
||||
public Dictionary<string, string> CreateHeadersTologin()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user