com.threerings.media.util
Interface Pathable

All Known Implementing Classes:
AnimationSprite, ButtonSprite, CharacterSprite, DelegatingPathable, FadableImageSprite, ImageSprite, LabelSprite, OrientableImageSprite, Sprite

public interface Pathable

Used in conjunction with a Path.


Method Summary
 Rectangle getBounds()
          Returns the rectangle that bounds the pathable.
 int getOrientation()
          Should return the orientation of the pathable, or DirectionCodes.NONE if the pathable does not support orientation.
 int getX()
          Returns the pathable's current x coordinate.
 int getY()
          Returns the pathable's current y coordinate.
 void pathBeginning()
          Called by a path when this pathable is made to start along a path.
 void pathCompleted(long timestamp)
          Called by a path when this pathable finishes moving along its path.
 void setLocation(int x, int y)
          Updates the pathable's current coordinates.
 void setOrientation(int orient)
          Will be called by a path when it moves the pathable in the specified direction.
 

Method Detail

getX

int getX()
Returns the pathable's current x coordinate.


getY

int getY()
Returns the pathable's current y coordinate.


getBounds

Rectangle getBounds()
Returns the rectangle that bounds the pathable.


setLocation

void setLocation(int x,
                 int y)
Updates the pathable's current coordinates.


setOrientation

void setOrientation(int orient)
Will be called by a path when it moves the pathable in the specified direction. Pathables that wish to face in the direction they are moving can take advantage of this callback.

See Also:
DirectionCodes

getOrientation

int getOrientation()
Should return the orientation of the pathable, or DirectionCodes.NONE if the pathable does not support orientation.


pathBeginning

void pathBeginning()
Called by a path when this pathable is made to start along a path.


pathCompleted

void pathCompleted(long timestamp)
Called by a path when this pathable finishes moving along its path.