public class PlacementConstraints extends Object implements com.threerings.util.DirectionCodes, StageCodes
CARDINAL_DIRECTIONS, CCW, CW, DIRECTION_COUNT, DOWN, EAST, EASTNORTHEAST, EASTSOUTHEAST, FINE_DIRECTION_COUNT, HORIZONTAL, LEFT, NONE, NORTH, NORTHEAST, NORTHNORTHEAST, NORTHNORTHWEST, NORTHWEST, RIGHT, SOUTH, SOUTHEAST, SOUTHSOUTHEAST, SOUTHSOUTHWEST, SOUTHWEST, UP, VERTICAL, WEST, WESTNORTHWEST, WESTSOUTHWESTERR_CANNOT_CLUSTER, ERR_NO_OVERLAP, MODIFY_SCENE_ACCESS, MUTILATE_SCENE_ACCESS, STAGE_MESSAGE_BUNDLE, TILESET_RSRC_SET| Constructor and Description |
|---|
PlacementConstraints(com.threerings.media.tile.TileManager tilemgr,
StageScene scene)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addObject(com.threerings.miso.data.ObjectInfo info)
Adds the specified object through the constraints.
|
String |
allowAddObject(com.threerings.miso.data.ObjectInfo info)
Determines whether the constraints allow the specified object to be
added to the scene.
|
String |
allowModifyObjects(com.threerings.miso.data.ObjectInfo[] added,
com.threerings.miso.data.ObjectInfo[] removed)
Determines whether the constraints allow the specified objects to be
added and removed simultaneously.
|
String |
allowRemoveObject(com.threerings.miso.data.ObjectInfo info)
Determines whether the constraints allow the specified object to be
removed from the scene.
|
void |
removeObject(com.threerings.miso.data.ObjectInfo info)
Removes the specified object through the constraints.
|
public PlacementConstraints(com.threerings.media.tile.TileManager tilemgr,
StageScene scene)
public String allowAddObject(com.threerings.miso.data.ObjectInfo info)
null if the constraints allow the operation,
otherwise a translatable string explaining why the object can't be
addedpublic void addObject(com.threerings.miso.data.ObjectInfo info)
public String allowRemoveObject(com.threerings.miso.data.ObjectInfo info)
null if the constraints allow the operation,
otherwise a translatable string explaining why the object can't be
removedpublic void removeObject(com.threerings.miso.data.ObjectInfo info)
public String allowModifyObjects(com.threerings.miso.data.ObjectInfo[] added, com.threerings.miso.data.ObjectInfo[] removed)
null if the constraints allow the operation,
otherwise a translatable string explaining why the objects can't be
modifiedCopyright © 2015. All rights reserved.