This commit is contained in:
wulongxiao 2024-11-28 00:41:50 +08:00
commit 30a9c4105b
8 changed files with 1765 additions and 3124 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,44 @@
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();
}
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 62e9dc8f31497bf48818eaef521fc78e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -6,6 +6,7 @@ using UnityEngine.UI;
public class BetBtn : MonoBehaviour
{
public static BetBtn instance;
public int BetHorseId;//ͶעÂíÆ¥id
public GameObject BetList;
public Button NumBtn;
public Text BetText;

View File

@ -0,0 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class HorseInfo : MonoBehaviour
{
public int KnightId { get; set; }
public int HorseNo { get; set; }
public int HorseUserNo { get; set; }
public float HorseBeansCoin { get; set; }
public Text numText;
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a43840eac8e0c044ebaaa195da97f152
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -55,6 +55,24 @@ public class RacingPanel : MonoBehaviour
//当前选中蜗牛的钱
private GameObject nowObj;
//ÎÏÅ£¿¨ÉÏÎÒͶµÄÇ®
public Text imgMeiT;
public Text imgPigT;
public Text imgDuT;
public Text imgGangT;
public Text imgBianT;
public Text imgChaoT;
public Text imgLeiT;
public Text imgMieT;
public Text AllimgMeiT;
public Text AllimgPigT;
public Text AllimgDuT;
public Text AllimgGangT;
public Text AllimgBianT;
public Text AllimgChaoT;
public Text AllimgLeiT;
public Text AllimgMieT;
// Start is called before the first frame update
void Start()
{
@ -64,42 +82,50 @@ public class RacingPanel : MonoBehaviour
//更新按钮图片上滑
ImgUpward(imgMei, imgMeiQ);
//当前选中的蜗牛
BetBtn.instance.BetHorseId = 1;
});
//蜘蛛侠
btnPig.onClick.AddListener(() =>
{
ImgUpward(imgPig, imgPigQ);
BetBtn.instance.BetHorseId = 2;
});
//毒液
btnDu.onClick.AddListener(() =>
{
ImgUpward(imgDu, imgDuQ);
BetBtn.instance.BetHorseId = 3;
});
//钢铁侠
btnGang.onClick.AddListener(() =>
{
ImgUpward(imgGang, imgGangQ);
BetBtn.instance.BetHorseId = 4;
});
//蝙蝠侠
btnBian.onClick.AddListener(() =>
{
ImgUpward(imgBian, imgBianQ);
BetBtn.instance.BetHorseId = 5;
});
//超人
btnChao.onClick.AddListener(() =>
{
ImgUpward(imgChao, imgChaoQ);
BetBtn.instance.BetHorseId = 6;
});
//雷神
btnLei.onClick.AddListener(() =>
{
ImgUpward(imgLei, imgLeiQ);
BetBtn.instance.BetHorseId = 7;
});
//灭霸
btnMie.onClick.AddListener(() =>
{
ImgUpward(imgMie, imgMieQ);
BetBtn.instance.BetHorseId = 8;
});
}