This document is about: QUANTUM 2
SWITCH TO

API-ITournamentHubController


Available in the Gaming Circle and Industries Circle
Circle

Namespace: Gimmebreak.Backbone.Tournaments

Inheritance: Object → ITournamentHubController

This interface provides set of methods for user to interact with tournament via connected tournament hub (ITournamentHubCallbackHandler). After tournament hub is initialized then controller implementing this interaface is provided to tournament hub. Use tournament hub controller to join users active match to receive tournament match status updates. When calling JoinTournamentMatch() a tournament match handler can be provided that creates a interface between tournament hub and game room/lobby api.

C#

public interface ITournamentHubController

Properties

ActiveMatchFinishDeadlineCountdown

Determine remaining time until users active match has to be finished.

C#

public abstract virtual TimeSpan ActiveMatchFinishDeadlineCountdown
{
    get;
}

Remarks

Finish deadline can be obtained for any match from match property Deadline.

ActiveMatchStartDeadlineCountdown

Determine remaining time until users active match should start.

C#

public abstract virtual TimeSpan ActiveMatchStartDeadlineCountdown
{
    get;
}

Remarks

Start deadline can be obtained for any match by calling tournament.GetMatchStartDeadline(TournamentMatch).

IsConnectedToGameServerNetwork

Determine if tournament match handler is connected to game servers.

C#

public abstract virtual bool IsConnectedToGameServerNetwork
{
    get;
}

Remarks

This can be used to inform UI (E.g. tournament handler is switching to preferred tournament server region).

IsGameSessionInProgress

Determine if game session is in progress.

C#

public abstract virtual bool IsGameSessionInProgress
{
    get;
}

IsMatchHandlerInitialized

Determine if tournament match handler is initialized.

C#

public abstract virtual bool IsMatchHandlerInitialized
{
    get;
}

Remarks

This is set to true after successful call by JoinTournamentMatch(TournamentMatch, ITournamentMatchCallbackHandler). Also set back to false after LeaveTournamentMatch() call.

IsTournamentRunning

Determine if tournament is running (has started).

C#

public abstract virtual bool IsTournamentRunning
{
    get;
}

IsUserKnockedOut

Determine if user has been knocked out of the tournament.

C#

public abstract virtual bool IsUserKnockedOut
{
    get;
}

NextEventCountdown

Determine remaining time until next deciding event for user. (E.g. remaining time until tournament starts.)

C#

public abstract virtual TimeSpan NextEventCountdown
{
    get;
}

PartyInvites

Get all party invites user received for this tournament. This contains also dismissed invites.

C#

public abstract virtual IEnumerable<TournamentPartyInviteNotification> PartyInvites
{
    get;
}

Remarks

To refresh user invites (E.g. to get recently received ones) call LoadNotifications() on backbone client.

Status

Get current tournament hub status.

C#

public abstract virtual TournamentHubStatus Status
{
    get;
}

Tournament

Get tournament that this controller was initialized for.

C#

public abstract virtual Tournament Tournament
{
    get;
}

Methods

IsUserConnectedToMatch(long)

Determine if specific user is connected to tournament match room/lobby.

C#

public abstract virtual bool IsUserConnectedToMatch(long userId)

Parameters

  • userId: Backbone user id.

Returns

True if user is connected.

Remarks

This can be used to inform UI (E.g. tournament user is connected in room/lobby).

IsUserReadyForMatch(long)

Determine if specific user is ready for tournament match.

C#

public abstract virtual bool IsUserReadyForMatch(long userId)

Parameters

  • userId: Backbone user id.

Returns

True if user is ready.

Remarks

This can be used to inform UI (E.g. user is connected in room/lobby, is set on desired room slot, etc.).

JoinTournamentMatch(TournamentMatch, ITournamentMatchCallbackHandler)

Informs tournament hub that user wants to join a specific match and initiate connection to games room/lobby. It also requires to pass tournament match callback handler (ITournamentMatchCallbackHandler) that is an interface to games room/lobby handling API (E.g. set up a private game room with specific parameters).

C#

public abstract virtual void JoinTournamentMatch(Gimmebreak.Backbone.Tournaments.TournamentMatch match, Gimmebreak.Backbone.Tournaments.ITournamentMatchCallbackHandler tournamentMatchHandler)

Parameters

  • match: Tournament match user wants to join.
  • tournamentMatchHandler: Tournament match handler implementing ITournamentMatchCallbackHandler interfacing room/lobby handling API.

Remarks

After requesting to join a match tournament hub will start receiving tournament match status via callback OnHubMatchStatusChanged(TournamentHubMatchStatus).

LeaveTournamentMatch()

Leave joined tournament match.

C#

public abstract virtual void LeaveTournamentMatch()

Remarks

After requesting to leave a match tournament hub will stop receiving tournament match status via callback OnHubMatchStatusChanged(TournamentHubMatchStatus). This will also prompt tournament match handler to leave joined room/lobby.

RefreshActiveMatch()

User request to refresh UserActiveMatch data.

C#

public abstract virtual void RefreshActiveMatch()

SetUserReady()

User informs tournament that he is ready for next match. This is meant to be used in case when tournament hub status is set to TournamentHubStatus.WaitingForUserReadyConfirmation.

C#

public abstract virtual void SetUserReady()

Remarks

Almost every time when user finishes a match then system does not immediately move users to next round. It also depends on specific phase format if user will be given autolose or moved to next match when round finishes. As an example, in bracket setup, winning users are moved forward when round is finished. As an example, in arena setup, users will be given autolose for failing to call SetUserReady().

Back to top