Call this once when connecting to a space.
player ID of the other
Returns a list of all objects in the map matching a condition.
The map you want to filter objects on.
A predicate that returns a truthy value if you want the object to be returned.
Returns the keys for all completed maps. See docstring for getKnownPartialMaps().
Returns all known maps- i.e the keys of game.partialMaps We add this abstraction for convience and clarity, and because game.partialMaps could be renamed. You should prefer to use this function.
Returns all players that are in the same map as you.
The string mapId you want to filter on
Puts the currently connected client in ghost mode
ghost value, either 1 or 0; whether you are ghosting or not.
id of player whose ghost value you want to set (must be space owner to set)
Utility function that returns true if a player is standing inside a given private space. Requires the map to be defined first - use game.waitForInit() to be sure it has been defined. You can pass this directly into filterPlayersInSpace using a thunk.
A Partial referencing the player
the map the private tile is in
the name of the private space you put in the mapmaker
Animates an object moving from its current position to
Also handles setting the object's new position in the map itself.
Utility function for map developers that plays a sound file on the client, once. Use targetId if you are a space owner to play a sound on another client. If no sound is specified, it plays for the entire space. You must be a space owner to play a sound on the whole space.
HTMl5 compliant audio resource, e.g a URL to a mp3
scalar volume from 0 to 1.0
id of another player you want to play the sound on
a Promise that resolves when initialization is finished. Rejects if you attempt to wait before init-ing.
Generated using TypeDoc