Class Location

java.lang.Object
  |
  +--Location

public class Location
extends java.lang.Object

Location of objects inside the game. It can be used for both characters and items.


Constructor Summary
Location()
          Creates an empty location class.
Location(float lng, float lat)
          Creates a location with the specified longitude and latitude.
 
Method Summary
 Facet getFacet()
          Return the facet that the location is on.
 float getLatitude()
          Returns the latitude of the location.
 float getLongitude()
          Returns the longitude of the location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Location

public Location()
Creates an empty location class.

Location

public Location(float lng,
                float lat)
Creates a location with the specified longitude and latitude.
Parameters:
lng - longitude
lat - latitude
Method Detail

getLongitude

public float getLongitude()
Returns the longitude of the location.

getLatitude

public float getLatitude()
Returns the latitude of the location.

getFacet

public Facet getFacet()
Return the facet that the location is on. The first time this function is called, the facet is computed as described in the WDB document. The result is stored in a private variable that is referenced all subsequent times.