Members
group :Group
This player's group.
Type:
id :String
The player's ID.
Type:
- String
idInGroup :Number
Type:
- Number
participant :Participant
This player's participant.
Type:
points :number
Type:
- number
stage :Stage
Type:
stageIndex :number
Type:
- number
status :string
The current status of this player.
- 'ready': the player is ready to play their current stage, but is waiting (for their fellow group members).
- 'playing': the player is playing their current stage.
- 'done': the player is done playing their current stage, waiting to call 'Stage.playerEnd(player)'.
- 'finished': player is ready to move to next stage.
See Session Flow tutorial for more details.
Type:
- string
Methods
(static) load(json, session) → {type}
Parameters:
Name | Type | Description |
---|---|---|
json |
type | description |
session |
type | description |
Returns:
description
- Type
- type
addClient(client)
addClient - description
Parameters:
Name | Type | Description |
---|---|---|
client |
type | description |
app()
app - description
Returns:
App The app that this player is a member of.
appIndex() → {type}
appIndex - description
Returns:
description
- Type
- type
atLeastFinishedStage()
Is the player at least finished the given stage of the given period?
Return false if any of the following are true:
- the player is in a previous app.
- the player is in the same app, but a previous period.
- the player is in the same period, but a previous stage.
- the player is in the same stage, but is still 'playing'.
Otherwise return true.
CALLED FROM:
- Stage#playerCanGroupProceedToNextStage.
compId() → {type}
compId - description
Returns:
description
- Type
- type
emit(name, dta)
emit - description
Parameters:
Name | Type | Description |
---|---|---|
name |
type | description |
dta |
type | description |
emitUpdate() → {type}
emitUpdate - description
Returns:
description
- Type
- type
isFinished() → {type}
isFinished - description
Returns:
description
- Type
- type
isReady() → {type}
isReady - description
Returns:
description
- Type
- type
matchesPlayer(plyrShell) → {boolean}
matchesPlayer - description
Parameters:
Name | Type | Description |
---|---|---|
plyrShell |
type | description |
Returns:
whether or not the inputted player matches this one.
- Type
- boolean
nextStage()
The next stage for this player.
old() → {type}
old - description
Returns:
description
- Type
- type
otherPlayersInGroup() → {type}
otherPlayersInGroup - description
Returns:
description
- Type
- type
period() → {type}
period - description
Returns:
description
- Type
- type
periodIndex() → {type}
periodIndex - description
Returns:
description
- Type
- type
roomId() → {type}
roomId - description
Returns:
description
- Type
- type
save()
save - description
sendUpdate(channel)
sendUpdate - description
Parameters:
Name | Type | Description |
---|---|---|
channel |
type | description |
session() → {type}
session - description
Returns:
description
- Type
- type
shell() → {type}
this - description
Returns:
description
- Type
- type
shellWithChildren() → {type}
CALLED FROM
- Participant#shellAll
Returns:
description
- Type
- type