private void OnPlayerReady(IApiClient client, RoundController roundController) { if (SetupState.IsAttackerReady && SetupState.IsDefenderReady) { SetupState.AttackerUpgrades.Add(AttackerUpgrader); roundController.StartGameLoop(client, SetupState, this); } }
public void MarkDefenderReady(IApiClient client, RoundController roundController) { if (GameRoomController.GameRoomState == null || !GameRoomController.GameRoomState.IsBothPlayersConnected()) { client.ErrorOccured("Trying mark defender as ready before room created and/or both players are ready."); return; } client.DefenderWasMarkedReady(); SetupState.IsDefenderReady = true; OnPlayerReady(client, roundController); }