public interface Positionable extends Updatable
Modifier and Type | Method and Description |
---|---|
<T extends Positionable> |
addPostionChangeListener(PositionChangeListener<T> listener)
Adds a
PositionChangeListener to be notified of coordinate
changes |
float |
getDistanceTo(Positionable positionable)
Returns this distance between this object's x,y coordinates and the
provided
Positionable 's xy coordinates |
float |
getX()
Returns the x coordinate of this object
|
float |
getY()
Returns the y coordinate of this object
|
<T extends Positionable> |
removePositionChangeListener(PositionChangeListener<T> listener)
Removes a
PositionChangeListener to stop it being notified of
coordinate changes |
interpolate, update
float getX()
float getY()
float getDistanceTo(Positionable positionable)
Positionable
's xy coordinatespositionable
- The Positionable
to retrieve the distance from<T extends Positionable> void addPostionChangeListener(PositionChangeListener<T> listener)
PositionChangeListener
to be notified of coordinate
changeslistener
- The PositionChangeListener
to add<T extends Positionable> void removePositionChangeListener(PositionChangeListener<T> listener)
PositionChangeListener
to stop it being notified of
coordinate changeslistener
- The PositionChangeListener
to remove