|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.io.SimpleStreamableObject
com.threerings.whirled.spot.data.Portal
public class Portal
Represents an exit to another scene. A body sprite would walk over to a portal's coordinates and then either proceed off of the edge of the display, or open a door and walk through it, or fizzle away in a Star Trekkian transporter style or whatever is appropriate for the game in question. It contains information on the scene to which the body exits when using this portal and the location at which the body sprite should appear in that target scene.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.threerings.io.Streamable |
|---|
com.threerings.io.Streamable.Closure |
| Field Summary | |
|---|---|
Location |
loc
The location of the portal. |
short |
portalId
This portal's unique identifier. |
short |
targetPortalId
The portal identifier of the portal at which a body will enter the target scene when they "use" this portal, or -1 to specify that the body enters on the default portal, whatever id it is. |
int |
targetSceneId
The scene identifier of the scene to which a body will exit when they "use" this portal. |
| Constructor Summary | |
|---|---|
Portal()
|
|
| Method Summary | |
|---|---|
Portal |
clone()
|
boolean |
equals(Object other)
Portal equality is determined by portal id. |
Location |
getLocation()
Returns a location instance configured with the location and orientation of this portal. |
Location |
getOppLocation()
Returns a location instance configured with the location and opposite orientation of this portal. |
int |
hashCode()
Computes a reasonable hashcode for portal instances. |
boolean |
isValid()
Returns true if the portal has a potentially valid target scene and portal id (they are not guaranteed to exist, but they are at least potentially valid values rather than -1 or 0). |
| Methods inherited from class com.threerings.io.SimpleStreamableObject |
|---|
toString |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public short portalId
public Location loc
public int targetSceneId
public short targetPortalId
| Constructor Detail |
|---|
public Portal()
| Method Detail |
|---|
public Location getLocation()
public Location getOppLocation()
public boolean isValid()
public Portal clone()
clone in class Objectpublic boolean equals(Object other)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||