Added getSceneId(Place).
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@373 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -32,12 +32,20 @@ public class ScenePlace extends Place
|
||||
/** The id of the scene occupied by the body. */
|
||||
public int sceneId;
|
||||
|
||||
/**
|
||||
* Returns the scene id for the supplied place or -1 if the place is null or not a scene place.
|
||||
*/
|
||||
public static int getSceneId (Place place)
|
||||
{
|
||||
return (place instanceof ScenePlace) ? ((ScenePlace)place).sceneId : -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the scene id occupied by the supplied body or -1 if the body is not in a scene.
|
||||
*/
|
||||
public static int getSceneId (BodyObject bobj)
|
||||
{
|
||||
return (bobj.location instanceof ScenePlace) ? ((ScenePlace)bobj.location).sceneId : -1;
|
||||
return getSceneId(bobj.location);
|
||||
}
|
||||
|
||||
/** Used when unserializing. */
|
||||
|
||||
Reference in New Issue
Block a user