using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; using System.Threading.Tasks; using Unity.VisualScripting; using UnityEditor; using UnityEngine; using UnityEngine.UI; using UnityEngine.Windows; using System.Linq; using static BettingBtn; using static UnityEditor.Progress; public class AllHouseContro : MonoBehaviour { public PlayerInfo settlementCoinUpdate;//结算后更新左上角玩家金币数字=================================================================== public List HouseBtnList=new List(); public int roomNo = -1; public int escapeId = -1; public string gameNo; public GameObject text; public GameObject detailsText; public HouseBtn house; public List bossobj; public HouseBtn BoosHouse;//Boos房间 public GameObject BazhuPanel; public WarnPanel warnPanel; public List wonnius = new List(); public Allother allother;//控制其他蜗牛 public bool HaveallotherMove; public List otherWoniusList=new List();//其他蜗牛列表 public PlayerMove player;//玩家 public bool HaveLoad; public HistoryPanel historyPanel; public bool IsLoadIn;//是否已经进入游戏 public bool IsHideLoadPanel;//是否关闭加载页面 public List KillNos;//击杀房间列表 public ListPanel listPanel; // Start is called before the first frame update async void Start() { battleRoyaleGameDetails(); GetInfo516(); GetInfo517(); InvokeRepeating("checkOutAllTheEscapeRoomsAsync", 2,2); } void OnDestroy() { CancelInvoke("checkOutAllTheEscapeRoomsAsync"); } public async Task ReGet511() { Dictionary head511 = new Dictionary { { "Authorization", Global.global.serverResponse.data.token } }; string response511 = await web.SendRequest(web.URL + "/snail/gameEscape/queryLatest", "POST", "{}", head511); Debug.Log("5.1.1查询最近一场大屠杀" + response511); // 解析服务器返回的数据 Global.global.response = JsonConvert.DeserializeObject(response511); escapeId = Global.global.response.data.gameEscapeModel.id; gameNo = Global.global.response.data.gameEscapeModel.gameNo; int index = 0; if (Global.global.response.data.gameEscapeRoomResponseVoList.Count>0) { foreach (GameEscapeRoomResponseVo item in Global.global.response.data.gameEscapeRoomResponseVoList) { if (HouseBtnList[index].roomNo == item.roomNo) { HouseBtnList[index].escapeId = item.escapeId; HouseBtnList[index].roomBeansCoin = item.roomBeansCoin; } index++; //HouseBtnList[index].roomNo = item.roomNo; //HouseBtn a = HouseBtnList[index]; //HouseBtnList[index].gameObject.GetComponentInChildren