void JoinGame(GameSessionUiController match, string gameSessionId) { DeactivateButtons(); string password = match.GetPassword(); AwsLambdaClient.SendJoinGameRequest(gameSessionId, ProfileController.username, password, SetupGame); }
GameSessionUiController CreateGameSessionUi(string gameSessionId, string creatorId, bool isPrivate) { GameSessionUiController match = Instantiate(gameSessionUI, matches.transform); match.SetUsername(creatorId); match.SetPrivacy(isPrivate); match.SetPlayCallback(() => JoinGame(match, gameSessionId)); return(match); }