com.threerings.whirled.spot.server
Class SpotSceneManager
java.lang.Object
com.threerings.crowd.server.PlaceManager
com.threerings.whirled.server.SceneManager
com.threerings.whirled.spot.server.SpotSceneManager
- All Implemented Interfaces:
- com.threerings.crowd.chat.data.ChatCodes, com.threerings.crowd.chat.server.SpeakHandler.SpeakerValidator, com.threerings.crowd.data.LocationCodes, com.threerings.presents.data.InvocationCodes, com.threerings.presents.dobj.ChangeListener, com.threerings.presents.dobj.MessageListener, SceneCodes, SpotCodes
- Direct Known Subclasses:
- StageSceneManager
public class SpotSceneManager
- extends SceneManager
- implements SpotCodes
Handles the movement of bodies between locations in the scene and creates the necessary
distributed objects to allow bodies in clusters to chat with one another.
| Nested classes/interfaces inherited from class com.threerings.crowd.server.PlaceManager |
com.threerings.crowd.server.PlaceManager.DelegateOp, com.threerings.crowd.server.PlaceManager.MessageHandler |
| Fields inherited from interface com.threerings.crowd.chat.data.ChatCodes |
BROADCAST_ACCESS, BROADCAST_MODE, CHAT_ACCESS, CHAT_CHANNEL_NOTIFICATION, CHAT_NOTIFICATION, DEFAULT_IDLE_TIME, DEFAULT_MODE, EMOTE_MODE, IDLE_TIME_KEY, LAST_MODE, PLACE_CHAT_TYPE, SHOUT_MODE, SUCCESS, THINK_MODE, USER_CHAT_TYPE, USER_DISCONNECTED, USER_NOT_ONLINE, XLATE_MODES |
| Fields inherited from interface com.threerings.crowd.data.LocationCodes |
ALREADY_THERE, MOVE_IN_PROGRESS, NO_SUCH_PLACE |
| Fields inherited from interface com.threerings.presents.data.InvocationCodes |
ACCESS_DENIED, E_ACCESS_DENIED, E_INTERNAL_ERROR, GLOBAL_GROUP, INTERNAL_ERROR |
|
Method Summary |
void |
clearEnteringBody(com.threerings.crowd.data.BodyObject body)
Called if a body failed to enter our scene after we assigned them an entering position. |
void |
mapEnteringBody(com.threerings.crowd.data.BodyObject body,
Portal from)
Assigns a starting location for an entering body. |
String |
mayTraversePortal(com.threerings.crowd.data.BodyObject body,
Portal portal)
This is called when a user requests to traverse a portal from this scene to another scene. |
static void |
moveBodyToDefaultPortal(com.threerings.crowd.server.PlaceRegistry plreg,
com.threerings.crowd.data.BodyObject body)
Move the specified body to the default portal, if possible. |
void |
willTraversePortal(com.threerings.crowd.data.BodyObject body,
Portal portal)
This is called to let this scene manager know that the user is about to traverse the
specified portal. |
| Methods inherited from class com.threerings.crowd.server.PlaceManager |
addDelegate, applyToDelegates, applyToOccupants, bodyWillEnter, bodyWillLeave, checkPermissions, getConfig, getPlaceObject, init, isValidSpeaker, messageReceived, ratifyBodyEntry, registerMessageHandler, shutdown, startup, toString, updateOccupantInfo |
SpotSceneManager
public SpotSceneManager()
moveBodyToDefaultPortal
public static void moveBodyToDefaultPortal(com.threerings.crowd.server.PlaceRegistry plreg,
com.threerings.crowd.data.BodyObject body)
- Move the specified body to the default portal, if possible.
mapEnteringBody
public void mapEnteringBody(com.threerings.crowd.data.BodyObject body,
Portal from)
- Assigns a starting location for an entering body. This will happen before the body is made
to "occupy" the scene (defined by their having an occupant info record). So when they do
finally occupy the scene, the client will know where to render them.
clearEnteringBody
public void clearEnteringBody(com.threerings.crowd.data.BodyObject body)
- Called if a body failed to enter our scene after we assigned them an entering position.
mayTraversePortal
public String mayTraversePortal(com.threerings.crowd.data.BodyObject body,
Portal portal)
- This is called when a user requests to traverse a portal from this scene to another scene.
The manager may return an error code string that will be reported back to the caller
explaining the failure or
null indicating that it is OK for the caller to
traverse the portal.
willTraversePortal
public void willTraversePortal(com.threerings.crowd.data.BodyObject body,
Portal portal)
- This is called to let this scene manager know that the user is about to traverse the
specified portal. The default implementation relocates the user to the location associated
with the portal. It is still possible that the traversal will fail, so don't do anything too
crazy.
Copyright © 2011. All Rights Reserved.