MultiPlayerServerOptions object passed to initialize the MultiPlayerServer
InputHandler to use on the server
Socket.io instance
GameObject to use when a new player joins the server
Function to run when a connection is disconnected
Function to run when a new connection is made
Function to run when a new player joins the server. Should return a GameObject and a label for the player, or a promise that will resolve into a GameObject and a label for the player. If no function is provided, the GameObject will be a clone of newPlayerObject
Function to run when a new player joins the server. Should return a GameObject and a label for the player, or a promise that will resolve into a GameObject and a label for the player. If no function is provided, the GameObject will be a clone of newPlayerObject
SceneManager instance that the server is using
Array of socket connections that the server is connected to
Speed (in ms) of the server tick (Default: 1000/60)
Emits an event to a given socket. "key_down", "key_up", "player_data", and "player_initialized" are reserved events.
Either socket.io socket, label of a connection, or a connection to emit an event to
Event to fire
Data to emit
Generated using TypeDoc
Classdesc
MultiPlayerServer class, used for constructing, running, and managing a multiplayer server
Example