Allow the BodyObject to play along when we enter and leave a place.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5108 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2008-05-18 11:30:45 +00:00
parent 9b92f14412
commit ec3fb4023a
2 changed files with 33 additions and 9 deletions
@@ -129,11 +129,34 @@ public class BodyObject extends ClientObject
* Creates a blank occupant info instance that will used to publish information about the
* various bodies occupying a place.
*/
public OccupantInfo createOccupantInfo (PlaceObject placeObject)
public OccupantInfo createOccupantInfo (PlaceObject plobj)
{
return new OccupantInfo(this);
}
/**
* Called when this body is about to enter the specified place. Configures our {@link
* #location} field.
*
* @param place the identifying information for the place we are entering.
* @param plobj the distributed object for the place we are entering.
*/
public void willEnterPlace (Place place, PlaceObject plobj)
{
setLocation(place);
}
/**
* Called when this body has left its occupied place. Clears our {@link #location} field.
*
* @param plobj the distributed object for the place we just departed. This might be null if
* the place object has been destroyed.
*/
public void didLeavePlace (PlaceObject plobj)
{
setLocation(null);
}
// documentation inherited
public void applyToListeners (ListenerOp op)
{