Members
appIndex :number
The current app index of this participant.
0 indicates no current app.
Type:
- number
- Default Value:
- 0
- Source:
autoplay :boolean
Type:
- boolean
- Default Value:
- false
- Source:
clients :array
Type:
- array
- Default Value:
- []
- Source:
finishedApps
List of app ids that this participant has completed.
- Source:
id :String
Unique identifier for this participant.
Type:
- String
- Source:
outputHide :Array
'outputHide' fields are not included in output.
Type:
- Array
- Default Value:
- []
- Source:
outputHideAuto :Array.<String>
'outputHideAuto' fields are not included in output.
Type:
- Array.<String>
- Source:
periodIndex :number
Indexed at 0.
Type:
- number
- Default Value:
- -1
- Source:
player :Player
The current player of this participant.
Type:
- Default Value:
- null
- Source:
players :array
Type:
- array
- Default Value:
- []
- Source:
session :Session
Session for this participant.
Type:
- Source:
Methods
(static) load(json, session) → {type}
Parameters:
Name | Type | Description |
---|---|---|
json |
type | description |
session |
type | description |
- Source:
Returns:
description
- Type
- type
isFinishedApp(app) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
app |
App | The given app. |
- Source:
Returns:
If the player is in a previous app, as given by the app's
indexInSession compared to the participant's appIndex, then return false.
If the player is in a previous app, return false.
If the player is in this app,
- not yet in the last period, return false.
- in the last period, but still 'playing', return false.
- in the last period and not 'playing', return true.
If the player is past this app, true.
- Type
- boolean
moveToNextStage()
Move this participant to their next stage.
If the participant is already playing in an app as a player, call that player's Player#moveToNextStage function. Otherwise, call Session#participantMoveToNextApp.
- Source:
pointsForApp()
Returns the points the participant earned in the given app.
If app is null, returns points earned across all apps.
- Source:
roomId() → {type}
roomId - description
- Source:
Returns:
description
- Type
- type
stageId() → {type}
stageId - description
- Source:
Returns:
description
- Type
- type