Module: server/multi

server/multi

Entry point for the server side multi library for developing multiscreen games. Call init() to initialize this library.
Source:

Classes

Multi

Members

<static> color :module:shared/color

Loaded color module for color helper functions.
Type:
Source:

<static> screens :module:plugins/screens

Type:
Source:

Methods

<static> init() → {module:server/multi~Multi}

Call this once to initialize the multi framework.
Source:
Returns:
the one and only Multi instance
Type
module:server/multi~Multi

Type Definitions

toClient

Option to determine to which client a message should be send (not to which _instance_ on this client).
You can set it to:
  • 'all' - the message will be send to all clients currently connected to this session
  • [player1, player2] - message will be send to all clients that are represented by players inside this array
  • myPlayer - the message will be send to the client that is represented by myPlayer
Type:
  • string | Array.<string> | module:server/player~Player
Source: