2024-10-31 16:50:35 +08:00
|
|
|
|
using System;
|
2024-10-31 02:49:53 +08:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
2024-11-01 02:27:50 +08:00
|
|
|
|
using Unity.VisualScripting;
|
2024-10-31 02:49:53 +08:00
|
|
|
|
using UnityEngine;
|
2024-10-31 16:50:35 +08:00
|
|
|
|
using UnityEngine.UI;
|
2024-10-31 02:49:53 +08:00
|
|
|
|
|
|
|
|
|
public class InitInfo : MonoBehaviour
|
|
|
|
|
{
|
2024-10-31 16:50:35 +08:00
|
|
|
|
private MainObject parsedData;
|
2024-11-01 02:27:50 +08:00
|
|
|
|
|
2024-10-31 02:49:53 +08:00
|
|
|
|
|
2024-10-31 16:50:35 +08:00
|
|
|
|
public Text name;
|
2024-11-01 02:27:50 +08:00
|
|
|
|
public Text userid;
|
2024-10-31 02:49:53 +08:00
|
|
|
|
// Start is called before the first frame update
|
2024-10-31 16:50:35 +08:00
|
|
|
|
private async void Start()
|
2024-10-31 02:49:53 +08:00
|
|
|
|
{
|
2024-11-15 21:40:33 +08:00
|
|
|
|
|
|
|
|
|
|
2024-11-07 20:27:33 +08:00
|
|
|
|
//string response = await web.SendRequest("http://47.109.133.52/Player/GetInfo", "POST");
|
|
|
|
|
//Debug.Log(response);
|
2024-10-31 16:50:35 +08:00
|
|
|
|
|
2024-11-07 20:27:33 +08:00
|
|
|
|
//parsedData = JsonUtility.FromJson<MainObject>(response);
|
2024-10-31 16:50:35 +08:00
|
|
|
|
|
2024-11-07 20:27:33 +08:00
|
|
|
|
//Debug.Log(parsedData.Info.Gold);
|
2024-10-31 16:50:35 +08:00
|
|
|
|
|
2024-11-07 20:27:33 +08:00
|
|
|
|
//Promptmgr.assestPanel.SetCoinText(parsedData.Info.Gold);
|
|
|
|
|
//Promptmgr.assestPanel.SetStoneText(parsedData.Info.Gem);
|
2024-10-31 16:50:35 +08:00
|
|
|
|
|
2024-11-01 02:27:50 +08:00
|
|
|
|
//name.text = parsedData.Info.Name;
|
|
|
|
|
//userid.text = "id :" + parsedData.Info.Id;
|
2024-10-31 16:50:35 +08:00
|
|
|
|
|
2024-11-15 21:40:33 +08:00
|
|
|
|
|
2024-11-01 05:26:28 +08:00
|
|
|
|
//if (itemList.List == null)
|
|
|
|
|
//{
|
|
|
|
|
// Debug.Log("list<73><74>");
|
|
|
|
|
// //Debug.Log(rootData.);
|
|
|
|
|
//}
|
2024-10-31 20:16:46 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-11-15 21:40:33 +08:00
|
|
|
|
|
|
|
|
|
// Debug.Log(rootData.Info.Id);
|
2024-10-31 16:50:35 +08:00
|
|
|
|
|
2024-10-31 02:49:53 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Update is called once per frame
|
|
|
|
|
void Update()
|
|
|
|
|
{
|
|
|
|
|
|
2024-10-31 16:50:35 +08:00
|
|
|
|
}
|
2024-10-31 02:49:53 +08:00
|
|
|
|
|
2024-10-31 16:50:35 +08:00
|
|
|
|
}
|
|
|
|
|
public class MainObject
|
2024-10-31 02:49:53 +08:00
|
|
|
|
{
|
2024-10-31 16:50:35 +08:00
|
|
|
|
public Info Info;
|
|
|
|
|
public int ErrorCode;
|
|
|
|
|
public string ErrorMessage;
|
2024-10-31 02:49:53 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-10-31 16:50:35 +08:00
|
|
|
|
[Serializable]
|
|
|
|
|
public class Info
|
2024-10-31 02:49:53 +08:00
|
|
|
|
{
|
2024-10-31 16:50:35 +08:00
|
|
|
|
public string Id;
|
2024-10-31 02:49:53 +08:00
|
|
|
|
public int Gold;
|
2024-10-31 16:50:35 +08:00
|
|
|
|
public int Gem;
|
|
|
|
|
|
|
|
|
|
public string Phone;
|
|
|
|
|
public string Name;
|
2024-10-31 02:49:53 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-01 02:27:50 +08:00
|
|
|
|
[System.Serializable]
|
|
|
|
|
public class PlayerData
|
2024-10-31 02:49:53 +08:00
|
|
|
|
{
|
2024-11-01 02:27:50 +08:00
|
|
|
|
public string Id;
|
|
|
|
|
public string Name;
|
|
|
|
|
public float Gold;
|
|
|
|
|
public string Phone;
|
2024-11-01 05:26:28 +08:00
|
|
|
|
public float Level;
|
2024-11-01 02:27:50 +08:00
|
|
|
|
public object IslandId;
|
|
|
|
|
public object IsLocked;
|
|
|
|
|
public object IsCanceled;
|
|
|
|
|
|
|
|
|
|
|
2024-11-01 05:26:28 +08:00
|
|
|
|
|
2024-11-01 02:27:50 +08:00
|
|
|
|
public object Referrer;
|
|
|
|
|
public object Referrals;
|
|
|
|
|
|
|
|
|
|
public object Gem;
|
|
|
|
|
public object Ore;
|
|
|
|
|
public object Forge;
|
|
|
|
|
public object FirstBlood;
|
|
|
|
|
public object LoginCount;
|
|
|
|
|
public object TeamLevel;
|
|
|
|
|
public object Contribution;
|
|
|
|
|
public object Stamina;
|
|
|
|
|
public object TreeLevel;
|
|
|
|
|
public object TreeExp;
|
|
|
|
|
public object Water;
|
|
|
|
|
public object CreateDateTime;
|
2024-10-31 02:49:53 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-01 02:27:50 +08:00
|
|
|
|
[Serializable]
|
|
|
|
|
public class InfoData
|
2024-10-31 02:49:53 +08:00
|
|
|
|
{
|
2024-10-31 16:50:35 +08:00
|
|
|
|
public string Id;
|
|
|
|
|
public string Name;
|
2024-11-01 02:27:50 +08:00
|
|
|
|
public float Gold;
|
2024-11-02 11:19:48 +08:00
|
|
|
|
public float Gem;
|
2024-11-05 17:31:45 +08:00
|
|
|
|
public float Ore;
|
2024-11-02 11:19:48 +08:00
|
|
|
|
public float Forge;
|
|
|
|
|
public float Water;
|
2024-11-01 02:27:50 +08:00
|
|
|
|
public int Level;
|
|
|
|
|
}
|
2024-11-02 11:19:48 +08:00
|
|
|
|
[Serializable]
|
|
|
|
|
public class infopyler
|
|
|
|
|
{
|
|
|
|
|
public InfoData Info;
|
|
|
|
|
public int ErrorCode;
|
|
|
|
|
public string ErrorMessage;
|
|
|
|
|
}
|
2024-11-01 02:27:50 +08:00
|
|
|
|
|
|
|
|
|
[System.Serializable]
|
|
|
|
|
public class RootData
|
|
|
|
|
{
|
|
|
|
|
public PlayerData[] List;
|
|
|
|
|
public object Info ;
|
|
|
|
|
public int Stamina;
|
|
|
|
|
public int Count;
|
|
|
|
|
public int ErrorCode;
|
|
|
|
|
public string ErrorMessage;
|
2024-10-31 02:49:53 +08:00
|
|
|
|
}
|
2024-10-31 16:50:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|