GodotMattohaLobbySystem 0.2.4
Loading...
Searching...
No Matches
Mattoha.Nodes.MattohaClient Class Reference

Public Member Functions

delegate void ConnectedToServerEventHandler ()
 Emmited when connection to server is succeed.
 
delegate void PlayerRegisteredEventHandler (Dictionary< string, Variant > playerData)
 Emmited when player is connected and registered in server memory.
 
delegate void LoadLobbyPlayersSucceedEventHandler (Array< Dictionary< string, Variant > > players)
 Emmited when loading lobby players loaded successfully.
 
delegate void LoadLobbyPlayersFailedEventHandler (string cause)
 Emmited when loading lobby player failed.
 
delegate void LoadAvailableLobbiesSucceedEventHandler (Array< Dictionary< string, Variant > > lobbies)
 Emmited when available lobbies loaded successfully.
 
delegate void LoadAvailableLobbiesFailedEventHandler (string cause)
 Emmited when available lobbies failed to load.
 
delegate void SetPlayerDataSucceedEventHandler (Dictionary< string, Variant > playerData)
 Emitted when setting player data succeeds.
 
delegate void SetPlayerIsInGameSucceedEventHandler (bool value)
 Emitted when change IsInGame value for the current player is done.
 
delegate void SetPlayerDataFailedEventHandler (string cause)
 Emitted when setting player data fails.
 
delegate void CreateLobbySucceedEventHandler (Dictionary< string, Variant > lobbyData)
 Emitted when creating a lobby succeeds.
 
delegate void CreateLobbyFailedEventHandler (string cause)
 Emitted when creating a lobby fails.
 
delegate void SetLobbyDataSucceedEventHandler (Dictionary< string, Variant > lobbyData)
 Emitted when setting lobby data succeeds.
 
delegate void SetLobbyDataFailedEventHandler (string cause)
 Emitted when setting lobby data fails.
 
delegate void SetLobbyOwnerSucceedEventHandler (Dictionary< string, Variant > lobbyData)
 Emitted when setting the lobby owner succeeds.
 
delegate void SetLobbyOwnerFailedEventHandler (string cause)
 Emitted when setting the lobby owner fails.
 
delegate void StartGameSucceedEventHandler (Dictionary< string, Variant > lobbyData)
 Emitted when starting the game succeeds.
 
delegate void StartGameFailedEventHandler (string cause)
 Emitted when starting the game fails.
 
delegate void EndGameSucceedEventHandler (Dictionary< string, Variant > lobbyData)
 Emitted when ending the game succeeds.
 
delegate void EndGameFailedEventHandler (string cause)
 Emitted when ending the game fails.
 
delegate void JoinLobbySucceedEventHandler (Dictionary< string, Variant > lobbyData)
 Emitted when joining a lobby succeeds.
 
delegate void JoinLobbyFailedEventHandler (string cause)
 Emitted when joining a lobby fails.
 
delegate void LeaveLobbySucceedEventHandler ()
 Emitted when leaving a lobby succeeds.
 
delegate void JoinTeamSucceedEventHandler (int newTeam)
 Emitted when joining a team succeeds.
 
delegate void JoinTeamFailedEventHandler (string cause)
 Emitted when joining a team fails.
 
delegate void NewPlayerJoinedEventHandler (Dictionary< string, Variant > playerData)
 Emitted when a new player joins.
 
delegate void JoinedPlayerUpdatedEventHandler (Dictionary< string, Variant > playerData)
 Emitted when a joined player updates their information.
 
delegate void PlayerChangedHisTeamEventHandler (Dictionary< string, Variant > playerData)
 Emitted when a player changes their team.
 
delegate void PlayerJoinedEventHandler (Dictionary< string, Variant > playerData)
 Emitted when a player joins current lobby.
 
delegate void PlayerLeftEventHandler (Dictionary< string, Variant > playerData)
 Emitted when a player leaves.
 
delegate void SpawnNodeRequestedEventHandler (Dictionary< string, Variant > nodeData)
 Emitted when a node spawn is requested.
 
delegate void SpawnNodeFailedEventHandler (string cause)
 Emitted when node spawning fails.
 
delegate void SpawnLobbyNodesSucceedEventHandler ()
 Emitted when spawning lobby nodes finishes.
 
delegate void SpawnLobbyNodesFailedEventHandler (string cause)
 Emitted when spawning lobby nodes fails.
 
delegate void DespawnNodeRequestedEventHandler (Dictionary< string, Variant > nodeData)
 Emitted when a node despawn is requested.
 
delegate void DespawnNodeFailedEventHandler (string cause)
 Emitted when node despawning fails.
 
delegate void DespawnRemovedSceneNodesFailedEventHandler (string cause)
 Emitted when despawning removed scene nodes fails.
 
delegate void GlobalMessageReceivedEventHandler (Dictionary< string, Variant > senderData, string message)
 Emitted when a global message is received.
 
delegate void GlobalMessageFailedEventHandler (string cause)
 Emitted when sending a global message fails.
 
delegate void LobbyMessageReceivedEventHandler (Dictionary< string, Variant > senderData, string message)
 Emitted when a lobby message is received.
 
delegate void LobbyMessageFailedEventHandler (string cause)
 Emitted when sending a lobby message fails.
 
delegate void TeamMessageReceivedEventHandler (Dictionary< string, Variant > senderData, string message)
 Emitted when a team message is received.
 
delegate void TeamMessageFailedEventHandler (string cause)
 Emitted when sending a team message fails.
 
override void _Ready ()
 
Array< long > GetLobbyPlayersIds (bool onlyInGamePlayers=true)
 Returns joined lobby players Ids.
 
bool IsPlayerInLobby (long playerId)
 Check if peer id is joined in lobby or not.
 
bool IsPlayerInMyTeam (long playerId)
 Check if the player id is in same team.
 
bool IsPlayerInGame (long playerId)
 Returns true if player entered the game scene and spawned lobby nodes, this will be used under the hood for replication purposes.
 
void SetPlayerData (Dictionary< string, Variant > playerData)
 Set Player data in server, this will emit "SetPlayerDataSucceed" or "SetPlayerDataFailed", for current client and emmit "JoinedPlayerUpdated" for other lobby players.

Base player keys you can edit in addition to your custom keys:
 
void CreateLobby (Dictionary< string, Variant > lobbyData, string lobbySceneFile)
 Create new lobby on server, this will emmit "CreateLobbySucceed and SetPlayerDataSucceed" or "CreateLobbyFailed" for creator, and "LoadAvailableLobbiesSucceed" for all online players if "AutoLoadAvailableLobbies" is enabled.

Base lobby keys you can edit in addition to your custom keys:
 
void SetLobbyData (Dictionary< string, Variant > lobbyData)
 Set Lobby data and sync it, this will emmit "SetLobbyDataFailed" for caller user if Setting Data failed, and sync the data for all joined players - including caller user - then emmit "SetLobbyDataSucceed" for them, and "LoadAvailableLobbiesSucceed" for all online players if "AutoLoadAvailableLobbies" is enabled.

Base lobby keys you can edit in addition to your custom keys:
 
void SetLobbyOwner (int newOwnerId)
 Change lobby owner, this will emmit "SetLobbyOwnerSucceed" for all joined players including caller user if changing owner is succeed, and emmit "SetLobbyOwnerFailed" for caller user if setting owner fails, ONLY owner of the lobby can set new lobby owner.
 
void LoadAvailableLobbies ()
 Load Available lobbies, this will emmit "LoadAvailableLobbiesSucceed" or "LoadAvailableLobbiesFailed" for caller user.
 
void JoinLobby (int lobbyId)
 Join lobby by it's ID, this will emmit "JoinLobbySucceed" or "JoinLobbyFailed" for caller user, and "NewPlayerJoined" for other joined players, and "LoadAvailableLobbiesSucceed" for all online players if "AutoLoadAvailableLobbies" is enabled.
 
void StartGame ()
 Start Lobby Game, this will emmit "StartGameSucceed" for all joined players or "StartGameFailed" for caller user, and "LoadAvailableLobbiesSucceed" for all online players if "AutoLoadAvailableLobbies" is enabled.
 
void EndGame ()
 End Lobby Game, this ewill emmit "EndGameSucceed" for all joined players or "EndGameFailed" for caller user, and "LoadAvailableLobbiesSucceed" for all online players if "AutoLoadAvailableLobbies" is enabled.
 
void LoadLobbyPlayers ()
 Load players data that joined in same lobby, this will emmit "LoadLobbyPlayersSucceed" or "LoadLobbyPlayersFailed" for the caller user.
 
void SpawnNode (Node node, bool teamOnly=false, Array< string > additionalProps=null)
 Spawn node for all joined players in same lobby or same team, this will emmit "SpawnNodeRequested" for joined players or players in teams, "SpawnNodeFailed" will be emmited and node will be locally despawned if spawning node failed.
 
void SpawnLobbyNodes ()
 Spawn all lobby nodes tha has been spawned by other players, team only nodes will not be spawned until player in same team, this method will emmit "SpawnLobbyNodesSucceed" or "SpawnLobbyNodesFailed".
 
void SetPlayerIsInGame (bool value)
 Change the state of the current player if he is in game or not.
 
void DespawnNode (Node node)
 Despawn node and sync that with all players, this will emmit "DespawnNodeRequested" for all players and "DespawnNodeFailed" for caller user if despawning fails and then respawning the node in case if player destroyed it.
 
void DespawnRemovedSceneNodes ()
 Despawn All scene nodes that despawned during game player, used by gameholder when new player enter the game scene, this will emmit "DespawnRemovedSceneNodesSucceed" or "DespawnRemovedSceneNodesFailed".
 
void JoinTeam (int teamId)
 Join or change a team, this will emmit "JoinTeamSucceed" or "JoinTeamFailed" if joingin failed, in addition, "PlayerChangedHisTeam" will be emmited on all lobby players including the player itself.
 
void SendTeamMessage (string message)
 Send a message for team members, this will emmit "TeamMessageSucceed" for all players or "TeamMessageFailed" for caller user.
 
void SendLobbyMessage (string message)
 Send a message for lobby members, this will emmit "LobbyMessageSucceed" for all players or "LobbyMessageFailed" for caller user.
 
void SendGlobalMessage (string message)
 Send a global message for all online users, this will emmit "GlobalMessageSucceed" for all players or "GlobalMessageFailed" for caller user.
 
void LeaveLobby ()
 Leave joined lobby, this will emmit "LeaveLobbySucceed" for caller user and "PlayerLeft" for all joined players.
 

Properties

Node GameHolder [get]
 Returns The GameHolder node in game tree.
 
Node LobbyNode [get]
 Returns The LobbyNode (Current arena game scene of lobby) in game tree.
 
Dictionary< string, Variant > CurrentPlayer = new() [get]
 Returns the current player data synced with all players, "PrivateProps" list is not synced with others.
 
Dictionary< string, Variant > CurrentLobby = new() [get]
 Returns the current player data synced with all players in lobby, "PrivateProps" list is not synced with others.
 
Dictionary< long, Dictionary< string, Variant > > CurrentLobbyPlayers = new() [get]
 Returns the dictionary containing joined players in current lobby, without PrivateProps items.
 
bool CanReplicate [get]
 Returns true if player "IsInGame" proeprty is true, IsInGame will be true when player sync spawned lobby nodes by others.
 

Member Function Documentation

◆ CreateLobby()

void Mattoha.Nodes.MattohaClient.CreateLobby ( Dictionary< string, Variant > lobbyData,
string lobbySceneFile )

Create new lobby on server, this will emmit "CreateLobbySucceed and SetPlayerDataSucceed" or "CreateLobbyFailed" for creator, and "LoadAvailableLobbiesSucceed" for all online players if "AutoLoadAvailableLobbies" is enabled.

Base lobby keys you can edit in addition to your custom keys:

  • Name {string}
  • MaxPlayers {int}
  • PrivateProps {Godot Array of string}
Parameters
lobbyDataLobby Data to create.
lobbySceneFileThe scene file for lobby game, for example: "res://maps/arean.tscn".

◆ CreateLobbyFailedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.CreateLobbyFailedEventHandler ( string cause)

Emitted when creating a lobby fails.

Parameters
causeThe cause of the failure.

◆ CreateLobbySucceedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.CreateLobbySucceedEventHandler ( Dictionary< string, Variant > lobbyData)

Emitted when creating a lobby succeeds.

Parameters
lobbyDataThe data of the created lobby.

◆ DespawnNode()

void Mattoha.Nodes.MattohaClient.DespawnNode ( Node node)

Despawn node and sync that with all players, this will emmit "DespawnNodeRequested" for all players and "DespawnNodeFailed" for caller user if despawning fails and then respawning the node in case if player destroyed it.

Parameters
node

◆ DespawnNodeFailedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.DespawnNodeFailedEventHandler ( string cause)

Emitted when node despawning fails.

Parameters
causeThe cause of the failure.

◆ DespawnNodeRequestedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.DespawnNodeRequestedEventHandler ( Dictionary< string, Variant > nodeData)

Emitted when a node despawn is requested.

Parameters
nodeDataThe data of the node to be despawned.

◆ DespawnRemovedSceneNodesFailedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.DespawnRemovedSceneNodesFailedEventHandler ( string cause)

Emitted when despawning removed scene nodes fails.

Parameters
causeThe cause of the failure.

◆ EndGameFailedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.EndGameFailedEventHandler ( string cause)

Emitted when ending the game fails.

Parameters
causeThe cause of the failure.

◆ EndGameSucceedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.EndGameSucceedEventHandler ( Dictionary< string, Variant > lobbyData)

Emitted when ending the game succeeds.

Parameters
lobbyDataThe updated lobby data after ending the game.

◆ GetLobbyPlayersIds()

Array< long > Mattoha.Nodes.MattohaClient.GetLobbyPlayersIds ( bool onlyInGamePlayers = true)

Returns joined lobby players Ids.

Returns
IDs list.

◆ GlobalMessageFailedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.GlobalMessageFailedEventHandler ( string cause)

Emitted when sending a global message fails.

Parameters
causeThe cause of the failure.

◆ GlobalMessageReceivedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.GlobalMessageReceivedEventHandler ( Dictionary< string, Variant > senderData,
string message )

Emitted when a global message is received.

Parameters
senderDataThe data of the message sender.
messageThe received message.

◆ IsPlayerInGame()

bool Mattoha.Nodes.MattohaClient.IsPlayerInGame ( long playerId)

Returns true if player entered the game scene and spawned lobby nodes, this will be used under the hood for replication purposes.

Parameters
playerIdplayer id to check.
Returns
true if entered the game.

◆ IsPlayerInLobby()

bool Mattoha.Nodes.MattohaClient.IsPlayerInLobby ( long playerId)

Check if peer id is joined in lobby or not.

Parameters
playerIdpeer id
Returns
true if peerId is joined.

◆ IsPlayerInMyTeam()

bool Mattoha.Nodes.MattohaClient.IsPlayerInMyTeam ( long playerId)

Check if the player id is in same team.

Parameters
playerIdplayer id to check.
Returns
true if in same team.

◆ JoinedPlayerUpdatedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.JoinedPlayerUpdatedEventHandler ( Dictionary< string, Variant > playerData)

Emitted when a joined player updates their information.

Parameters
playerDataThe updated player data.

◆ JoinLobby()

void Mattoha.Nodes.MattohaClient.JoinLobby ( int lobbyId)

Join lobby by it's ID, this will emmit "JoinLobbySucceed" or "JoinLobbyFailed" for caller user, and "NewPlayerJoined" for other joined players, and "LoadAvailableLobbiesSucceed" for all online players if "AutoLoadAvailableLobbies" is enabled.

Parameters
lobbyIdLobby id to join to.

◆ JoinLobbyFailedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.JoinLobbyFailedEventHandler ( string cause)

Emitted when joining a lobby fails.

Parameters
causeThe cause of the failure.

◆ JoinLobbySucceedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.JoinLobbySucceedEventHandler ( Dictionary< string, Variant > lobbyData)

Emitted when joining a lobby succeeds.

Parameters
lobbyDataThe data of the joined lobby.

◆ JoinTeam()

void Mattoha.Nodes.MattohaClient.JoinTeam ( int teamId)

Join or change a team, this will emmit "JoinTeamSucceed" or "JoinTeamFailed" if joingin failed, in addition, "PlayerChangedHisTeam" will be emmited on all lobby players including the player itself.

Parameters
teamIdTeam ID to join to.

◆ JoinTeamFailedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.JoinTeamFailedEventHandler ( string cause)

Emitted when joining a team fails.

Parameters
causeThe cause of the failure.

◆ JoinTeamSucceedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.JoinTeamSucceedEventHandler ( int newTeam)

Emitted when joining a team succeeds.

Parameters
newTeamThe team the player joined.

◆ LoadAvailableLobbiesFailedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.LoadAvailableLobbiesFailedEventHandler ( string cause)

Emmited when available lobbies failed to load.

Parameters
causefail cause

◆ LoadAvailableLobbiesSucceedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.LoadAvailableLobbiesSucceedEventHandler ( Array< Dictionary< string, Variant > > lobbies)

Emmited when available lobbies loaded successfully.

Parameters
lobbiesAvailable lobbies

◆ LoadLobbyPlayersFailedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.LoadLobbyPlayersFailedEventHandler ( string cause)

Emmited when loading lobby player failed.

Parameters
causeFail cause.

◆ LoadLobbyPlayersSucceedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.LoadLobbyPlayersSucceedEventHandler ( Array< Dictionary< string, Variant > > players)

Emmited when loading lobby players loaded successfully.

Parameters
playersJoined players in lobby.

◆ LobbyMessageFailedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.LobbyMessageFailedEventHandler ( string cause)

Emitted when sending a lobby message fails.

Parameters
causeThe cause of the failure.

◆ LobbyMessageReceivedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.LobbyMessageReceivedEventHandler ( Dictionary< string, Variant > senderData,
string message )

Emitted when a lobby message is received.

Parameters
senderDataThe data of the message sender.
messageThe received message.

◆ NewPlayerJoinedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.NewPlayerJoinedEventHandler ( Dictionary< string, Variant > playerData)

Emitted when a new player joins.

Parameters
playerDataThe data of the new player.

◆ PlayerChangedHisTeamEventHandler()

delegate void Mattoha.Nodes.MattohaClient.PlayerChangedHisTeamEventHandler ( Dictionary< string, Variant > playerData)

Emitted when a player changes their team.

Parameters
playerDataThe data of the player who changed teams.

◆ PlayerJoinedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.PlayerJoinedEventHandler ( Dictionary< string, Variant > playerData)

Emitted when a player joins current lobby.

Parameters
playerDataThe data of the player who joined.

◆ PlayerLeftEventHandler()

delegate void Mattoha.Nodes.MattohaClient.PlayerLeftEventHandler ( Dictionary< string, Variant > playerData)

Emitted when a player leaves.

Parameters
playerDataThe data of the player who left.

◆ PlayerRegisteredEventHandler()

delegate void Mattoha.Nodes.MattohaClient.PlayerRegisteredEventHandler ( Dictionary< string, Variant > playerData)

Emmited when player is connected and registered in server memory.

Parameters
playerDataInitial player data.

◆ SendGlobalMessage()

void Mattoha.Nodes.MattohaClient.SendGlobalMessage ( string message)

Send a global message for all online users, this will emmit "GlobalMessageSucceed" for all players or "GlobalMessageFailed" for caller user.

Parameters
messagemessage to send.

◆ SendLobbyMessage()

void Mattoha.Nodes.MattohaClient.SendLobbyMessage ( string message)

Send a message for lobby members, this will emmit "LobbyMessageSucceed" for all players or "LobbyMessageFailed" for caller user.

Parameters
messagemessage to send.

◆ SendTeamMessage()

void Mattoha.Nodes.MattohaClient.SendTeamMessage ( string message)

Send a message for team members, this will emmit "TeamMessageSucceed" for all players or "TeamMessageFailed" for caller user.

Parameters
messagemessage to send.

◆ SetLobbyData()

void Mattoha.Nodes.MattohaClient.SetLobbyData ( Dictionary< string, Variant > lobbyData)

Set Lobby data and sync it, this will emmit "SetLobbyDataFailed" for caller user if Setting Data failed, and sync the data for all joined players - including caller user - then emmit "SetLobbyDataSucceed" for them, and "LoadAvailableLobbiesSucceed" for all online players if "AutoLoadAvailableLobbies" is enabled.

Base lobby keys you can edit in addition to your custom keys:

  • Name {string}
  • MaxPlayers {int}
  • PrivateProps {Godot Array of string}
  • LobbySceneFile {string}
Parameters
lobbyDataA dictionary containing the keys you want to update, its ok to use one key, no need for full lobby data.

◆ SetLobbyDataFailedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.SetLobbyDataFailedEventHandler ( string cause)

Emitted when setting lobby data fails.

Parameters
causeThe cause of the failure.

◆ SetLobbyDataSucceedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.SetLobbyDataSucceedEventHandler ( Dictionary< string, Variant > lobbyData)

Emitted when setting lobby data succeeds.

Parameters
lobbyDataThe updated lobby data.

◆ SetLobbyOwner()

void Mattoha.Nodes.MattohaClient.SetLobbyOwner ( int newOwnerId)

Change lobby owner, this will emmit "SetLobbyOwnerSucceed" for all joined players including caller user if changing owner is succeed, and emmit "SetLobbyOwnerFailed" for caller user if setting owner fails, ONLY owner of the lobby can set new lobby owner.

Parameters
newOwnerIdNew owner id

◆ SetLobbyOwnerFailedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.SetLobbyOwnerFailedEventHandler ( string cause)

Emitted when setting the lobby owner fails.

Parameters
causeThe cause of the failure.

◆ SetLobbyOwnerSucceedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.SetLobbyOwnerSucceedEventHandler ( Dictionary< string, Variant > lobbyData)

Emitted when setting the lobby owner succeeds.

Parameters
lobbyDataThe updated lobby data with the new owner.

◆ SetPlayerData()

void Mattoha.Nodes.MattohaClient.SetPlayerData ( Dictionary< string, Variant > playerData)

Set Player data in server, this will emit "SetPlayerDataSucceed" or "SetPlayerDataFailed", for current client and emmit "JoinedPlayerUpdated" for other lobby players.

Base player keys you can edit in addition to your custom keys:

  • Username {string}
  • TeamId {int}
  • PrivateProps {Godot Array of string}
  • ChatProps {Godot Array of string}
Parameters
playerDataA dictionary containing the keys to update, its ok to put only one key, no need for full player data.

◆ SetPlayerDataFailedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.SetPlayerDataFailedEventHandler ( string cause)

Emitted when setting player data fails.

Parameters
causeThe cause of the failure.

◆ SetPlayerDataSucceedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.SetPlayerDataSucceedEventHandler ( Dictionary< string, Variant > playerData)

Emitted when setting player data succeeds.

Parameters
playerDataThe updated player data.

◆ SetPlayerIsInGame()

void Mattoha.Nodes.MattohaClient.SetPlayerIsInGame ( bool value)

Change the state of the current player if he is in game or not.

Parameters
valuetrue if IsInGame should be true, otherwise false

◆ SetPlayerIsInGameSucceedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.SetPlayerIsInGameSucceedEventHandler ( bool value)

Emitted when change IsInGame value for the current player is done.

Parameters
playerDataThe updated player data.

◆ SpawnLobbyNodesFailedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.SpawnLobbyNodesFailedEventHandler ( string cause)

Emitted when spawning lobby nodes fails.

Parameters
causeThe cause of the failure.

◆ SpawnNode()

void Mattoha.Nodes.MattohaClient.SpawnNode ( Node node,
bool teamOnly = false,
Array< string > additionalProps = null )

Spawn node for all joined players in same lobby or same team, this will emmit "SpawnNodeRequested" for joined players or players in teams, "SpawnNodeFailed" will be emmited and node will be locally despawned if spawning node failed.

Parameters
nodeNode object (should be existing in tree)
teamOnlytrue if spawning should be for team only.
additionalPropsAdditional properties that will be synced during spawning node across players.

◆ SpawnNodeFailedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.SpawnNodeFailedEventHandler ( string cause)

Emitted when node spawning fails.

Parameters
causeThe cause of the failure.

◆ SpawnNodeRequestedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.SpawnNodeRequestedEventHandler ( Dictionary< string, Variant > nodeData)

Emitted when a node spawn is requested.

Parameters
nodeDataThe data of the node to be spawned.

◆ StartGameFailedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.StartGameFailedEventHandler ( string cause)

Emitted when starting the game fails.

Parameters
causeThe cause of the failure.

◆ StartGameSucceedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.StartGameSucceedEventHandler ( Dictionary< string, Variant > lobbyData)

Emitted when starting the game succeeds.

Parameters
lobbyDataThe updated lobby data after starting the game.

◆ TeamMessageFailedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.TeamMessageFailedEventHandler ( string cause)

Emitted when sending a team message fails.

Parameters
causeThe cause of the failure.

◆ TeamMessageReceivedEventHandler()

delegate void Mattoha.Nodes.MattohaClient.TeamMessageReceivedEventHandler ( Dictionary< string, Variant > senderData,
string message )

Emitted when a team message is received.

Parameters
senderDataThe data of the message sender.
messageThe received message.