|
delegate void | PlayerJoinedLobbyEventHandler (long playerId, int lobbyId) |
| Emmited when a player join a lobby.
|
|
delegate void | PlayerLeftLobbyEventHandler (long playerId, int lobbyId) |
| Emmited when a player leave a lobby.
|
|
delegate void | LobbyGameStartedEventHandler (int lobbyId) |
| Emmited when a lobby game started.
|
|
delegate void | LobbyGameEndedEventHandler (int lobbyId) |
| Emmited when a lobby game ended.
|
|
delegate void | LobbyRemovedEventHandler (int lobbyId) |
| Emmited when a lobby has been removed.
|
|
override void | _Ready () |
|
Dictionary< string, Variant > | FindSpawnedNode (Dictionary< string, Variant > payload) |
| Given a spawn payload, find the node in spawned nodes.
|
|
Dictionary< string, Variant > | FindRemovedSceneNode (Dictionary< string, Variant > payload) |
| Given a despawn payload, find the removed scene node in RemovedSceneNodes.
|
|
Dictionary< string, Variant > | GetPlayer (long playerId) |
| Get player by it's ID.
|
|
Dictionary< string, Variant > | GetPlayerLobby (long playerId) |
| Get lobby that player is joined to by player ID.
|
|
Array< Dictionary< string, Variant > > | GetLobbyPlayers (int lobbyId) |
| Get list of players that joined to a given lobby.
|
|
Array< Dictionary< string, Variant > > | GetLobbyPlayersSecured (int lobbyId) |
| Get list of players that joined to a given lobby but secure the dictionaries, meanining that any propert inside "PrivateProps" will be hidden.
|
|
void | SendRpcForPlayersInLobby (int lobbyId, string methodName, Dictionary< string, Variant > payload, bool secureDict=false, long superPeer=0, long ignorePeer=0) |
| Send an RPC from server to all players in a given lobby.
|
|
void | RefreshAvailableLobbiesForAll (bool force=false) |
| Refresh all available lobbies for all peers if "AutoLoadAvailableLobbies" is enabled or "force" argument is true.
|
|
void | LoadLobbyPlayersForAll (int lobbyId) |
| Refresh joined players list for all joined players in a given lobbyId.
|
|
void | SpawnNode (Dictionary< string, Variant > payload, int lobbyId) |
| Spawn node from server for all joined players in same lobby.
|
|
void | DespawnNode (Dictionary< string, Variant > payload) |
| Despawn node from server by passing a payload generated by method "GenerateNodePayloadData()".
|
|
void | RemovePlayerFromLobby (long playerId) |
| Remove player from joiend lobby, this will emmit "LeaveLobby" for player removed, "SetPlayerData" for player removed, "PlayerLeft" and "LoadLobbyPlayersSucceed" for joined players, "LoadAvailableLobbiesSucceed" for all online players if "AutoLoadAvailableLobbies" is enabled, in addition to sync data for players.
|
|
|
MattohaServerMiddleware | MiddlewareNode [get, set] |
| Server Middleware for executing logic before and after almost every event that client do, This node should have "MattohaMiddleware" or an inherited class node script attached to it.
|
|
Dictionary< long, Dictionary< string, Variant > > | Players = new() [get] |
| Registered players dictionary, where the key is the id of player.
|
|
Dictionary< int, Dictionary< string, Variant > > | Lobbies = new() [get] |
| Created lobbies by users, a dictionary where the key is the id of lobby.
|
|
Dictionary< int, Array< Dictionary< string, Variant > > > | SpawnedNodes = new() [get] |
| A dictionary that contains spawned nodes for each lobby, where the key is the lobby id.
|
|
Dictionary< int, Array< Dictionary< string, Variant > > > | RemovedSceneNodes = new() [get] |
| A dictionary that contains removed scene nodes that has been despawned during game play for each lobby, where the key is the lobby id.
|
|
Node | GameHolder [get] |
| The game holder node that contains lobbies nodes and game plays.
|
|