Merge branch 'main' of http://shu.sheziwanglo.cn:3000/shurongsen/Cute_demon_attacks
This commit is contained in:
commit
fd0f8bf8cb
File diff suppressed because it is too large
Load Diff
@ -19,6 +19,10 @@ public class AssetsPanel : MonoBehaviour
|
||||
public Text Coin;
|
||||
public Text Ore;
|
||||
public Text Forging;
|
||||
|
||||
public Text UserName;
|
||||
public Text UserID;
|
||||
public Image UserHead;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
@ -59,10 +63,13 @@ public class AssetsPanel : MonoBehaviour
|
||||
async void UpdateTaxt()
|
||||
{
|
||||
PlayerInfoData info=await Scene_main_jiekou.instance.PlayerInfos();
|
||||
Stone.text = info.gem.ToString();
|
||||
Coin.text = info.gold.ToString();
|
||||
Ore.text = info.water.ToString();
|
||||
Forging.text = info.forge.ToString();
|
||||
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();
|
||||
UserID.text = Scene_main_jiekou.instance.infoData.uid.ToString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
19
meng_yao/Assets/script/scene_Main/InfoPanel.cs
Normal file
19
meng_yao/Assets/script/scene_Main/InfoPanel.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
public class InfoPanel : MonoBehaviour
|
||||
{
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
11
meng_yao/Assets/script/scene_Main/InfoPanel.cs.meta
Normal file
11
meng_yao/Assets/script/scene_Main/InfoPanel.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 43a27910ef2f4394e9ab06d22ee24f7a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -7,15 +7,23 @@ using UnityEngine;
|
||||
public class Scene_main_jiekou :MonoBehaviour
|
||||
{
|
||||
login _Login = new login();
|
||||
treeInfo TreeInfoss = new treeInfo();
|
||||
treeTeamData teamData = new treeTeamData();
|
||||
treeFansList treeFansList = new treeFansList();
|
||||
treeGetWater getWater = new treeGetWater();
|
||||
wateringTree watering = new wateringTree();
|
||||
|
||||
public static Scene_main_jiekou instance;
|
||||
void Awake()
|
||||
public PlayerInfoData infoData;
|
||||
public void Awake()
|
||||
{
|
||||
instance=this;
|
||||
|
||||
}
|
||||
public async void Start()
|
||||
public async void Start()
|
||||
{
|
||||
|
||||
//await PlayerInfos();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -23,9 +31,37 @@ public class Scene_main_jiekou :MonoBehaviour
|
||||
public async Task<PlayerInfoData> PlayerInfos()
|
||||
{
|
||||
await _Login.TastLogin();
|
||||
|
||||
playerInfo playerInfo=new playerInfo();
|
||||
playerInfo playerInfo=new playerInfo();
|
||||
PlayerIndfo _PlayerIndfo = await playerInfo.PalyerInfo();
|
||||
infoData = _PlayerIndfo.Data;
|
||||
return _PlayerIndfo.Data;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<TreeInfo> TreeInfoS()//生态树信息
|
||||
{
|
||||
return await TreeInfoss.TreeInfo();
|
||||
}
|
||||
public async Task<TreeTeam> TreeTeamDatas()//生态树团队信息
|
||||
{
|
||||
return await teamData.TreeTeamData();
|
||||
}
|
||||
|
||||
public async Task<TreeFansListResponse> TreeFansListS()//生态树团队粉丝列表
|
||||
{
|
||||
return await treeFansList.TreeFansList();
|
||||
}
|
||||
|
||||
public async Task<bool> TreeGetWaters(int index, string transId)//生态树水滴采集
|
||||
{
|
||||
treeGetWaterBody body = new treeGetWaterBody();
|
||||
body.index = index;
|
||||
body.transId = transId;
|
||||
bool isSuccefful = await getWater.TreeGetWater(body);
|
||||
return isSuccefful;
|
||||
}
|
||||
|
||||
public async Task<WateringTreeResponse> WateringTrees()//生态树浇水
|
||||
{
|
||||
return await watering.WateringTree();
|
||||
}
|
||||
}
|
||||
|
@ -20,11 +20,11 @@ public class treeGetWater : MonoBehaviour
|
||||
{ "client-info", "{\"platform\":\"ios\",\"phone_product\":\"apple\",\"phone_model\":\"iPhone_8\",\"system_version\":\"12.0\",\"screen_size\":\"750*1334\",\"device_no\":\"e3e277810fff9d955ebdd7037eff51a8\",\"version\":\"1.0.0\"}" }
|
||||
};
|
||||
}
|
||||
public async Task<bool> TreeGetWater(int index,string transId)
|
||||
public async Task<bool> TreeGetWater(treeGetWaterBody body)
|
||||
{
|
||||
treeGetWaterBody body = new treeGetWaterBody();
|
||||
body.index = index;
|
||||
body.transId = transId;
|
||||
//treeGetWaterBody body = new treeGetWaterBody();
|
||||
//body.index = index;
|
||||
//body.transId = transId;
|
||||
string response = await myWeb.SendRequest(myWeb.URL + "/api/tree/gather", "POST", JsonConvert.SerializeObject(body), CreateHeaders());
|
||||
Debug.Log("生态树水滴采集" + response);
|
||||
//bbbb
|
||||
|
@ -20,7 +20,7 @@ public class treeInfo : MonoBehaviour
|
||||
{ "client-info", "{\"platform\":\"ios\",\"phone_product\":\"apple\",\"phone_model\":\"iPhone_8\",\"system_version\":\"12.0\",\"screen_size\":\"750*1334\",\"device_no\":\"e3e277810fff9d955ebdd7037eff51a8\",\"version\":\"1.0.0\"}" }
|
||||
};
|
||||
}
|
||||
public async Task<TreeInfo> TreeInfo()//ÀàÐÍ 0:±¦Ê¯µº 1:±¦Ê¯¿ó³¡ 10:½ð±Òµº 11:½ð±Ò¿ó³¡
|
||||
public async Task<TreeInfo> TreeInfo()
|
||||
{
|
||||
string response = await myWeb.SendRequest(myWeb.URL + "/api/tree/info", "GET", "{}", CreateHeaders());
|
||||
Debug.Log("Éú̬Ê÷ÐÅÏ¢" + response);
|
||||
|
Loading…
Reference in New Issue
Block a user