diff --git a/meng_yao/Assets/communal/mount.cs b/meng_yao/Assets/communal/mount.cs index f2c3c89d8..5822e6dce 100644 --- a/meng_yao/Assets/communal/mount.cs +++ b/meng_yao/Assets/communal/mount.cs @@ -22,6 +22,9 @@ public struct Login } + + + public class mount : MonoBehaviour { public static mount mountitem; diff --git a/meng_yao/Assets/script/cultivation_Jinsha_mine_slices/room.cs b/meng_yao/Assets/script/cultivation_Jinsha_mine_slices/room.cs index 2a3e86b4e..f3093a818 100644 --- a/meng_yao/Assets/script/cultivation_Jinsha_mine_slices/room.cs +++ b/meng_yao/Assets/script/cultivation_Jinsha_mine_slices/room.cs @@ -4,6 +4,8 @@ using UnityEngine; using TMPro; using System.Threading.Tasks; using Palmmedia.ReportGenerator.Core; +using System; +using System.Data; public class room : mount { @@ -71,13 +73,14 @@ public class room : mount PlayerManager.Instance.SetMoney(MoneyType.Stones, -10); } - Generate(); + haveNumber--; toolsNumber--; UpdateShowCazhi(); ChangeTextPro(); - + Generate();//是否有宝石 + //Vector3 GameObject.Instantiate(Boom, new Vector3(startPos.position.x, startPos.position.y + 0.5f, startPos.position.z - 1f), Quaternion.identity); @@ -117,6 +120,7 @@ public class room : mount UpdateShowCazhi(); ChangeTextPro(); + Generate();//是否有宝石 //Vector3 GameObject.Instantiate(Boom,new Vector3(startPos.position.x, startPos.position.y+0.5f, startPos.position.z-1f),Quaternion.identity); await Task.Delay(500); @@ -212,11 +216,16 @@ public class room : mount } } - private bool Generate() + private async void Generate() { + string response = await web.SendRequest("http://47.109.133.52/FisherElfActive/GetListOfGem", "POST"); + Debug.Log(response); + GetListOfGem data= JsonUtility.FromJson(response); + if (data.ErrorMessage == "") + { + Debug.Log("连接成功"); + } - - return true; } //开拓房间 @@ -284,4 +293,25 @@ public class room : mount } +public class GetListOfGem +{ + public List List; + public int ErrorCode; + public string ErrorMessage; +} + +public class GetListOfGemItem +{ + public string Id; + public int Num; + public int Type; + public string OwnerId; + public int ActivateValue; + public int GenerateValue; + public int AlreadyGenerateValue; + public int RemainEndureTime; + public int EndureTime; + public string CreateDateTime; +} +