Class ops.TrivialOperationRouter
Defined in: TrivialOperationRouter.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
close(cb)
|
|
push(operations)
Brings the locally created operations into the game.
|
|
Sets the factory to use to create operation instances from operation specs.
|
|
setPlaybackFunction(playback_func)
Sets the method which should be called to apply operations.
|
|
subscribe(eventId, cb)
|
|
unsubscribe(eventId, cb)
|
Method Detail
close(cb)
- Parameters:
- {function()} cb
{!boolean}
hasLocalUnsyncedOps()
- Returns:
- {!boolean}
{!boolean}
hasSessionHostConnection()
- Returns:
- {!boolean}
{undefined}
push(operations)
Brings the locally created operations into the game.
- Parameters:
- {!Array.} operations
- Returns:
- {undefined}
{undefined}
setOperationFactory(f)
Sets the factory to use to create operation instances from operation specs.
- Parameters:
- {!ops.OperationFactory} f
- Returns:
- {undefined}
{undefined}
setPlaybackFunction(playback_func)
Sets the method which should be called to apply operations.
- Parameters:
- {!function(!ops.Operation):boolean} playback_func
- Returns:
- {undefined}
{undefined}
subscribe(eventId, cb)
- Parameters:
- {!string} eventId
- {!Function} cb
- Returns:
- {undefined}
{undefined}
unsubscribe(eventId, cb)
- Parameters:
- {!string} eventId
- {!Function} cb
- Returns:
- {undefined}