public async Task BattleProcess() { Info.AllPlayerInfo.Player1Info = new NetInfoModel.PlayerInfo("gezi", "yaya", new List <CardDeck> { new CardDeck("gezi", 0, new List <int> { 1000, 1001, 1002, 1001, 1000, 1002, 1000, 1001, 1000, 1001, 1001, 1000, 1002 }) }); Info.AllPlayerInfo.Player2Info = new NetInfoModel.PlayerInfo("gezi", "yaya", new List <CardDeck> { new CardDeck("gezi", 0, new List <int> { 1001, 1001, 1000, 1000, 1001, 1001, 1000, 1000, 1001, 1001, 1001, 1000, 1002 }) }); await StateCommand.BattleStart(); for (int i = 0; i < 3; i++) { await StateCommand.RoundStart(i); while (true) { await StateCommand.TurnStart(); await StateCommand.WaitForPlayerOperation(); await StateCommand.TurnEnd(); if (Info.GlobalBattleInfo.IsBoothPass) { break; } } await StateCommand.RoundEnd(i); } await StateCommand.BattleEnd(); }
public async Task BattleProcess() { //Debug.LogError("对战开始"); await StateCommand.BattleStart(); for (int i = 0; i < 3; i++) { //Debug.LogError("小局开始"); await StateCommand.RoundStart(i); //await StateCommand.WaitForSelectProperty(); while (true) { Debug.LogError("回合开始"); await StateCommand.TurnStart(); await StateCommand.WaitForPlayerOperation(); if (Info.AgainstInfo.isBoothPass) { break; } await StateCommand.TurnEnd(); } await StateCommand.RoundEnd(i); } await StateCommand.BattleEnd(); Debug.Log("结束对局"); }