_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/SnailKnight52/knightTest.cs
2024-12-04 14:42:07 +08:00

51 lines
2.7 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//测试仅供参考
public class knightTest : MonoBehaviour
{
queryClosestKnight521 queryClosestKnight1 = new queryClosestKnight521();
queryKnightRoomList522 queryKnightRoomList = new queryKnightRoomList522();
SnailKnightBet523 queryClosestKnightBet5 = new SnailKnightBet523();
queryKnightKill524 queryKnightKill = new queryKnightKill524();
ClosestKnight knight;
queryKnightBetResult525 queryKnightBetResult525 = new queryKnightBetResult525();
queryKnightRecord526 queryKnightRecord = new queryKnightRecord526();
UnionPage16 unionPage = new UnionPage16();
UnionDetail17 unionDetail = new UnionDetail17();
GoodIdPage41 goodIdPage41 = new GoodIdPage41();
GoodIdResponse goodidpage = new GoodIdResponse();
async void Start()
{
//UnionPage Page = await unionPage.queryUnionPage(1);
//UnionDetalResponse Detail = await unionDetail.queryUnionDetail(1);
//goodidpage = await goodIdPage41.queryUnionPage();
//Debug.Log("+++++++++++++++"+ goodidpage.Data.TotalCount);
knight = await queryClosestKnight1.queryClosestKnight();//查询最近骑士房间
//queryKnightRoomList.queryKnightRoomLis(knight.Data.GameKnightRoomResponseVoList[0].KnightId);
//Debug.Log("=========================================="+knight.Data.GameKnightRoomResponseVoList[0].KnightId);//查询房间详情
////KnightRoomBetList roomBetList = await queryKnightRoomList.queryKnightRoomLis(knight.Data.GameKnightRoomResponseVoList[0].KnightId);//查询房间下注
//await queryClosestKnightBet5.SnailKnightBet(knight.Data.GameKnightRoomResponseVoList[0].KnightId, 20, 3);//下注
////await queryKnightKill.queryKnightKill(knight.Data.GameKnightRoomResponseVoList[0].KnightId);//查询击杀
await queryKnightBetResult525.queryKnightBetResult(knight.Data.GameKnightRoomResponseVoList[0].KnightId);//查询结算
//// 调用 queryKnightKill 方法,首次延迟 3 秒,之后每 3 秒调用一次
////KnightRecord knightRecord = await queryKnightRecord.queryKnightBetResult(1);//526查询用户战斗记录
//await queryKnightRecord.queryKnightBetResult(1);//526查询用户战斗记录
////Debug.Log("++++++++++++++++++++++++++++++++++++"+knightRecord.data.beansCoinWin);
//InvokeRepeating("RepeatedQueryKnightKill", 1f, 1f);
}
private void RepeatedQueryKnightKill()
{
if (knight != null && knight.Data.GameKnightRoomResponseVoList.Count > 0)
{
// queryKnightBetResult525.queryKnightBetResult(knight.Data.GameKnightRoomResponseVoList[0].KnightId);//查询结算
//queryKnightKill.queryKnightKill(knight.Data.GameKnightRoomResponseVoList[0].KnightId);//查询击杀
}
}
}