using System.Collections; using System.Collections.Generic; using UnityEngine; public class AllManeger : MonoBehaviour { public queryClosestKnight521 queryClosestKnight521=new queryClosestKnight521(); public ClosestKnight closestKnight521 = new ClosestKnight(); public int id;//游戏id public string gameNo;//游戏编号 public int GameSession;//游戏场次 public List horseInfos = new List(); // Start is called before the first frame update async void Start() { closestKnight521 = await queryClosestKnight521.queryClosestKnight(); GetHorseInfo(closestKnight521.Data.GameKnightRoomResponseVoList); } // Update is called once per frame void Update() { } public void GetHorseInfo(List GameKnightRoomResponseVoList)//获得马匹的信息 { foreach (GameKnightRoomResponseVo item in GameKnightRoomResponseVoList) { foreach (HorseInfo horse in horseInfos) { horse.KnightId = item.KnightId; horse.HorseNo = item.HorseNo; horse.HorseUserNo = item.HorseUserNo; horse.HorseBeansCoin = item.HorseBeansCoin; horse.numText.text= item.HorseBeansCoin.ToString(); } } } }