Methods
(async, static) getPlayers(floor)
Private. Returns an object where the username of the player is the
key and the value is the player object.
Parameters:
Name | Type | Description |
---|---|---|
floor |
Floor |
- Source:
(async, static) load(floor)
Loads all players
Parameters:
Name | Type | Description |
---|---|---|
floor |
Floor | The floor to load the player for |
- Source:
(async, static) saveAll(floor)
Updates player records for all players in this lobby
Parameters:
Name | Type | Description |
---|---|---|
floor |
Floor | The floor to save |
- Source:
_pickupNearbyItems()
Player picks up nearby items that are not currently being worn
- Source:
_withinRadius(center, obj, radius)
Returns true if obj is within the desired radius of the center circle.
Parameters:
Name | Type | Description |
---|---|---|
center |
object | Coords to use that acts as the center of the circle |
obj |
object | Object to compare to center's coord |
radius |
int | the desired radius of the circle to check |
- Source:
die()
Player dies
- Source:
move()
Boost hp after you stop moving
- Source:
removeOldItems()
Removes items that have been worn past their due date
- Source:
respawn()
Move the player to the spawn point
- Source:
toJSON()
Serialize player model for client
- Source:
updateStats()
Updates the player's stats based on what is being worn.
- Source: