_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/RacingPanel/AllManeger.cs
2024-11-27 23:40:28 +08:00

45 lines
1.3 KiB
C#

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<HorseInfo> horseInfos = new List<HorseInfo>();
// 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<GameKnightRoomResponseVo> 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();
}
}
}
}