src/networking/Communication.js
/*
   * Join a certain instance with the given name.
   * @param instanceName name of the instance that the user connects to.
   * @param name The name of the player.
   * @param callback will get called when the user has connected to the instance.
   */
Join a certain instance with the given name.
@param instanceName name of the instance that the user connects to.
@param name The name of the player.
@param callback will get called when the user has connected to the instance.
Join a certain instance with the given name . @param instanceName name of the instance that the user connects to . @param name The name of the player . @param callback will get called when the user has connected to the instance .
joinInstance(instanceName, name, iconID, backgroundColor, iconColor, callback) {
    this.client.rpc.make(
      `${this.serviceName}/addPlayer/${instanceName}`,
      {
        id: this.id,
        name,
        iconID,
        backgroundColor,
        iconColor,
        sensor: { beta: 0, gamma: 0 },
      },
      (err, result) => {
        if (!err) {
          this.instance = instanceName;
          this.name = name;
          this.iconID = iconID;
          this.iconColor = iconColor;
          this.backgroundColor = backgroundColor;
          this.onJoined(err, result);
        }
        callback(err, result);
      }
    );
  }
joinInstance ( instanceName , name , iconID , backgroundColor , iconColor , callback ) { this . client . rpc . make ( ` ${ this . serviceName } ${ instanceName } ` , { id : this . id , name , iconID , backgroundColor , iconColor , sensor : { beta : 0 , gamma : 0 } , } , ( err , result ) => { if ( ! err ) { this . instance = instanceName ; this . name = name ; this . iconID = iconID ; this . iconColor = iconColor ; this . backgroundColor = backgroundColor ; this . onJoined ( err , result ) ; } callback ( err , result ) ; } ) ; }
Join a certain instance with the given name.
Join a certain instance with the given name .
// Set values // Start network loop