com.threerings.stage.server
Class StageSceneManager
java.lang.Object
com.threerings.crowd.server.PlaceManager
com.threerings.whirled.server.SceneManager
com.threerings.whirled.spot.server.SpotSceneManager
com.threerings.stage.server.StageSceneManager
- 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, com.threerings.presents.server.InvocationProvider, StageSceneProvider, SceneCodes, SpotCodes
public class StageSceneManager
- extends SpotSceneManager
- implements StageSceneProvider
Defines extensions to the basic Stage scene manager specific to displaying isometric "stage"
scenes (these may be indoor, outdoor or aboard a vessel).
| 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 |
addObject(com.threerings.presents.data.ClientObject caller,
com.threerings.miso.data.ObjectInfo info,
com.threerings.presents.client.InvocationService.ConfirmListener listener)
Handles a StageSceneService.addObject(com.threerings.miso.data.ObjectInfo, com.threerings.presents.client.InvocationService.ConfirmListener) request. |
boolean |
addObject(com.threerings.miso.data.ObjectInfo info,
boolean killOverlap,
boolean allowOverlap)
Adds the supplied object to this scene. |
com.threerings.media.util.AStarPathUtil.TraversalPred |
getCanStandPred()
Returns a traversal predicate for use with StageSceneUtil.findStandingSpot(java.awt.Rectangle, int, com.threerings.media.util.AStarPathUtil.TraversalPred, java.lang.Object, java.awt.Point, int) that
validates whether a player can stand in the searched spots. |
boolean |
isPassable(int tx,
int ty)
Returns true if the specified tile coordinate is passable (the base
tile is passable and it is not in the footprint of an object). |
boolean |
mayStandAtLocation(com.threerings.crowd.data.BodyObject source,
StageLocation loc)
Called by NPPs to determine whether or not they can stand at the
specified location. |
void |
removeObjects(com.threerings.presents.data.ClientObject caller,
com.threerings.miso.data.ObjectInfo[] info,
com.threerings.presents.client.InvocationService.ConfirmListener listener)
Handles a StageSceneService.removeObjects(com.threerings.miso.data.ObjectInfo[], com.threerings.presents.client.InvocationService.ConfirmListener) request. |
void |
setColor(int classId,
int colorId)
Changes the default colorization for the specified color class. |
| 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 |
StageSceneManager
public StageSceneManager()
getCanStandPred
public com.threerings.media.util.AStarPathUtil.TraversalPred getCanStandPred()
- Returns a traversal predicate for use with
StageSceneUtil.findStandingSpot(java.awt.Rectangle, int, com.threerings.media.util.AStarPathUtil.TraversalPred, java.lang.Object, java.awt.Point, int) that
validates whether a player can stand in the searched spots.
addObject
public boolean addObject(com.threerings.miso.data.ObjectInfo info,
boolean killOverlap,
boolean allowOverlap)
- Adds the supplied object to this scene. A persistent update is generated and broadcast to
all scene occupants. The update is stored in the repository for communication to future
occupants of the scene and then entire complex process of changing our virtual game world is
effected at the simple call of this single method.
- Parameters:
killOverlap - if true, overlapping object will be removed, and the allowOverlap
argument will be ignored.allowOverlap - if true, overlapping objects will be allowed but one must be *very*
careful to ensure that they know what they are doing (i.e. the objects have render priorities
that correctly handle the overlap).
- Returns:
- true if the object was added, false if the add was rejected because the object
overlaps an existing scene object.
setColor
public void setColor(int classId,
int colorId)
- Changes the default colorization for the specified color class.
A persistent update is generated and broadcast to all scene
occupants. The update is stored in the repository for communication
to future occupants of the scene and then entire complex process
of changing our virtual game world is effected at the simple call
of this single method.
isPassable
public boolean isPassable(int tx,
int ty)
- Returns true if the specified tile coordinate is passable (the base
tile is passable and it is not in the footprint of an object).
mayStandAtLocation
public boolean mayStandAtLocation(com.threerings.crowd.data.BodyObject source,
StageLocation loc)
- Called by NPPs to determine whether or not they can stand at the
specified location.
addObject
public void addObject(com.threerings.presents.data.ClientObject caller,
com.threerings.miso.data.ObjectInfo info,
com.threerings.presents.client.InvocationService.ConfirmListener listener)
throws com.threerings.presents.server.InvocationException
- Description copied from interface:
StageSceneProvider
- Handles a
StageSceneService.addObject(com.threerings.miso.data.ObjectInfo, com.threerings.presents.client.InvocationService.ConfirmListener) request.
- Specified by:
addObject in interface StageSceneProvider
- Throws:
com.threerings.presents.server.InvocationException
removeObjects
public void removeObjects(com.threerings.presents.data.ClientObject caller,
com.threerings.miso.data.ObjectInfo[] info,
com.threerings.presents.client.InvocationService.ConfirmListener listener)
throws com.threerings.presents.server.InvocationException
- Description copied from interface:
StageSceneProvider
- Handles a
StageSceneService.removeObjects(com.threerings.miso.data.ObjectInfo[], com.threerings.presents.client.InvocationService.ConfirmListener) request.
- Specified by:
removeObjects in interface StageSceneProvider
- Throws:
com.threerings.presents.server.InvocationException
Copyright © 2011. All Rights Reserved.