public class Actor extends java.lang.Object implements GGBorderListener, GGActorCollisionListener, GGTileCollisionListener
Modifier and Type | Field and Description |
---|---|
GameGrid |
gameGrid
The reference to the GameGrid instance.
|
int |
nbCycles
The current number of simulation cycles since last reset.
|
Constructor and Description |
---|
Actor()
Constructs an actor with no sprite image.
|
Actor(boolean isRotatable,
java.awt.image.BufferedImage... spriteImages)
Constructs an actor based on one several sprite images defined by the given
buffered images.
|
Actor(boolean isRotatable,
java.awt.image.BufferedImage spriteImage)
Constructs actor based on the specified buffered image.
|
Actor(boolean isRotatable,
java.lang.String... filenames)
Constructs an actor based on one several sprite images.
|
Actor(boolean isRotatable,
java.lang.String filename)
Constructs an actor based on the specified sprite image.
|
Actor(boolean isRotatable,
java.lang.String filename,
int nbSprites)
Constructs an actor based on one or more sprite images.
|
Actor(java.awt.image.BufferedImage... spriteImages)
Constructs an unrotatable actor based on one or several sprite images
defined by the given buffered images.
|
Actor(java.awt.image.BufferedImage spriteImage)
Constructs an unrotatable actor based on the specified sprite image.
|
Actor(java.lang.String... filenames)
Constructs an unrotatable actor based on several sprite images.
|
Actor(java.lang.String filename)
Constructs an unrotatable actor based on the specified sprite image.
|
Actor(java.lang.String filename,
int nbSprites)
Constructs an unrotatable actor based on one or more sprite images.
|
Modifier and Type | Method and Description |
---|---|
void |
act()
Empty method called in every simulation iteration.
|
void |
addActorCollisionListener(GGActorCollisionListener listener)
Registers a collision listener that reports collision events when
actors collide.
|
void |
addBorderListener(GGBorderListener listener)
Registers an GGBorderListener so that the callback method nearBorder() is called
when the actor's location is on a cell at the border of the game grid.
|
void |
addCollisionActor(Actor partner)
Registers a partner actor that becomes a collision candidate, e.g. that
is checked for collisions in every simulation cycle.
|
void |
addCollisionActors(java.util.ArrayList<Actor> partnerList)
Registers all actors in a list as collision candidates.
|
void |
addCollisionTile(Location location)
Registers a tile location that becomes a collision candidate, e.g. that
is checked for collisions in every simulation cycle.
|
void |
addCollisionTiles(java.util.ArrayList<Location> locationList)
Registers all tile locations in a list as collision candidates.
|
void |
addMouseTouchListener(GGMouseTouchListener listener,
int mouseEventMask)
Same as addMouseTouchListener(listener, mouseEventMask, onTopOnly)
with onTopOnly = false.
|
void |
addMouseTouchListener(GGMouseTouchListener listener,
int mouseEventMask,
boolean onTopOnly)
Add a GGMouseTouchListener to get notifications when the mouse
interacts with the mouse touch area.
|
void |
addTileCollisionListener(GGTileCollisionListener listener)
Registers a tile listener that reports collision events when actors
and tiles collide.
|
int |
collide(Actor actor1,
Actor actor2)
Empty implementation of a GGActorCollisionListener called when the two actors collides.
|
int |
collide(Actor actor,
Location location)
Empty implementation of a GGTileCollisionListener called when
the an actor collides with a tile.
|
static void |
delay(long time)
Delay execution for the given amount of time.
|
void |
displace(double ds)
Increases the current double displace position in the
current direction to the given double distance and moves the actor
in the cell that contains the given coordinates.
|
GGBackground |
getBackground()
Returns the GGBackground reference of the actor's game grid.
|
java.util.ArrayList<Actor> |
getCollisionActors()
Returns a list of partners that are collision candidates.
|
java.util.ArrayList<Actor> |
getCollisionActorsInRange(double radius,
java.lang.Class clazz,
int spriteId)
Returns all collision candidates who belongs to a given class whose collision areas
of the image with given sprite id intersects the circle with specified radius.
|
java.util.ArrayList<Location> |
getCollisionTiles()
Returns a list of tile locations that are collision candidates.
|
java.awt.image.BufferedImage |
getCurrentImage()
Returns the buffered image of the currently visible sprite picture.
|
double |
getDirection()
Gets the current direction.
|
double |
getDirectionStart()
Returns the start direction.
|
java.awt.geom.Point2D.Double |
getDisplacePosition()
Returns the current displace position.
|
int |
getHeight(int spriteId)
Returns the height of the sprite with given id.
|
int |
getIdVisible()
Returns the id of the visible sprite.
|
java.awt.image.BufferedImage |
getImage()
Returns the buffered image of the originally loaded sprite with
id = 0.
|
java.awt.image.BufferedImage |
getImage(int spriteId)
Returns the buffered image of the originally loaded sprite with
given sprite id.
|
int |
getIntDirection()
Gets the current direction rounded to the next integer.
|
Location |
getLocation()
Returns the current location (horizontal and vertical coordinates).
|
java.awt.Point |
getLocationOffset()
Returns the pixel offset in x- and y-direction relative to the current
location.
|
Location |
getLocationStart()
Returns the start location (horizontal and vertical coordinates).
|
int |
getNbCycles()
Returns the number of simulation cycles since last reset.
|
int |
getNbHorzCells()
Returns number of cells of actor's game grid in horizontal direction.
|
int |
getNbSprites()
Returns number of sprites.
|
int |
getNbVertCells()
Returns number of cells of actor's game grid in vertical direction.
|
java.util.ArrayList<Actor> |
getNeighbours(double distance)
Returns all actors in a specified distance.
|
java.util.ArrayList<Actor> |
getNeighbours(double distance,
java.lang.Class clazz)
Returns all actors of specified class in a specified distance.
|
Location |
getNextMoveLocation()
Returns the target location of the next move().
|
java.awt.Color |
getPixelColor(java.awt.Point pt)
Returns the color of the currently visible sprite image at given
pixel position ((0,0) at upper left vertex, x-axis to the right,
y-axis downwards).
|
java.awt.Point |
getPixelLocation()
Returns the location of the actor center in pixel coordinates taking
into account the current location offset (default offset is 0).
|
static GGVector |
getRotatedPosition(GGVector position,
java.awt.Point center,
double angle)
Returns a new position vector of given position vector
rotated with given center point by given angle.
|
int |
getRotationIndex()
Returns the current rotation index for rotatable actors.
|
static java.awt.image.BufferedImage |
getScaledImage(java.awt.image.BufferedImage bi,
double factor,
double angle)
Deprecated.
Use GGBitmap.getScaledImage instead.
GGBitmap.getScaledImage(BufferedImage bi, double factor, double angle) |
java.awt.image.BufferedImage |
getScaledImage(double factor,
double angle)
Same as getScaledImage(int spriteId, double factor, double angle)
with spriteId = 0.
|
java.awt.image.BufferedImage |
getScaledImage(int spriteId,
double factor,
double angle)
Returns the sprite image scaled by the given factor and rotated to the
given angle.
|
int |
getSlowDown()
Returns the current slow down factor.
|
int |
getWidth(int spriteId)
Returns the width of the sprite with given id.
|
int |
getX()
Returns the current horizontal coordinate.
|
int |
getXStart()
Returns the x-coordinate of the start location.
|
int |
getY()
Returns the current vertical coordinate.
|
int |
getYStart()
Returns the y-coordinate of the start location.
|
void |
hide()
Turns off the visiblity of this actor (all sprites are hidden, spriteId = -1).
|
boolean |
isActEnabled()
Returns true, if act() is invoked in every simulation cycle.
|
boolean |
isActorCollisionEnabled()
Returns true, if collision notification between actors is enabled.
|
boolean |
isHorzMirror()
Returns the horizontal mirroring state.
|
boolean |
isInGrid()
Returns true, if the actor's location is inside the grid.
|
boolean |
isMoveValid()
Returns true, if the next call of move() will put the actor in a cell
inside the game grid.
|
boolean |
isNearBorder()
Returns true, if the current location is on a border row or column.
|
boolean |
isRemoved()
Returns true, if the actor has been removed (by calling removeSelf() or
GameGrid.removeActor()).
|
boolean |
isRotatable()
Returns whether the actor is rotatable or not.
|
boolean |
isTileCollisionEnabled()
Returns true, if collision notification between tiles is enabled.
|
boolean |
isVertMirror()
Returns the vertical mirroring state.
|
boolean |
isVisible()
Returns true, if the actor is visible.
|
void |
move()
For a small grid (total number of cells <= 2500 = 50 * 50)
moves to one of 8 neighbour cells in the current direction (compass directions 45 degrees wide).
|
void |
move(int distance)
Moves the given distance in the current direction.
|
void |
nearBorder(Actor actor,
Location location)
Empty implementation of a BorderListener called when the actor is set into a border cell.
|
void |
removeSelf()
Removes the given actor from the scene, so that act() is not called any more.
|
void |
reset()
Empty method called when the actor is added to the game grid,
the reset button is clicked or doReset() is called.
|
void |
rotate(Location centerLoc,
double angle)
Rotates the actor with given rotation center location by the given angle.
|
void |
rotate(java.awt.Point center,
double angle)
Rotates the actor with given rotation center point by given angle.
|
void |
setActEnabled(boolean enable)
Enable/disable the invocation of act() in every simulation cycle.
|
void |
setActorCollisionEnabled(boolean enable)
Enable/disable the detection of collisions with the actor collision candidates.
|
void |
setCollisionCircle(int spriteId,
java.awt.Point center,
int radius)
Selects the circle (in pixel units) relative to the sprite image that is used for
collision detection.
|
void |
setCollisionCircle(java.awt.Point center,
int radius)
Same as setCollisionCircle(int spriteId, Point center, int radius)
for spriteId = 0.
|
void |
setCollisionImage()
Same as setCollisionImage(int spriteId) for spriteId = 0.
|
void |
setCollisionImage(int spriteId)
Selects collision detection on non-transparent pixels of the image.
|
void |
setCollisionLine(int spriteId,
java.awt.Point startPoint,
java.awt.Point endPoint)
Selects the line segment (in pixel units) relative to the sprite image that is used for
collision detection.
|
void |
setCollisionLine(java.awt.Point startPoint,
java.awt.Point endPoint)
Same as setCollisionLine(int spriteId, Point startPoint, Point endPoint)
for spriteId = 0.
|
void |
setCollisionRectangle(int spriteId,
java.awt.Point center,
int width,
int height)
Selects the rectangle (in pixel units) relative to the sprite image that is used for
collision detection.
|
void |
setCollisionRectangle(java.awt.Point center,
int width,
int height)
Same as setCollisionRectangle(int spriteId, Point center, int width, int height)
for spriteId = 0
|
void |
setCollisionSpot(int spriteId,
java.awt.Point spot)
Selects the hot spot (in pixel units) relative to the sprite image that is used for
collision detection.
|
void |
setCollisionSpot(java.awt.Point spot)
Same as setCollisionSpot(int spriteId, Point spot)
for spriteId = 0.
|
void |
setDirection(double direction)
Sets the moving direction.
|
void |
setDirection(Location.CompassDirection compassDir)
Sets the moving direction to the given compass direction.
|
void |
setDisplacePosition(java.awt.geom.Point2D.Double displacePosition)
Sets the current displace position and moves the actor in the cell that
contains the given coordinates.
|
void |
setHorzMirror(boolean enable)
If set, the sprite image shown is mirrored horizontally.
|
void |
setLocation(Location location)
Assigns a new current location.
|
void |
setLocationOffset(int x,
int y)
Same as setLoctionOffset(Point locationOffset) with given x and
y displacements.
|
void |
setLocationOffset(java.awt.Point locationOffset)
Sets a pixel offset in x- any y-direction relative to the current
location.
|
void |
setMouseTouchCircle(int spriteId,
java.awt.Point center,
int radius)
Selects the circle (in pixel units) relative to the sprite image that is used for
mouse touch detection.
|
void |
setMouseTouchCircle(java.awt.Point center,
int radius)
Same as setMouseTouchCircle(int spriteId, Point center, int radius)
for all sprites of this actor.
|
void |
setMouseTouchEnabled(boolean enable)
Enable/disable the detection of mouse interactions.
|
void |
setMouseTouchImage()
Same as setMouseTouchImage(int spriteId) for all sprites of this actor.
|
void |
setMouseTouchImage(int spriteId)
Selects the non-transparent pixels of the sprite image for
mouse touch detection.
|
void |
setMouseTouchRectangle(int spriteId,
java.awt.Point center,
int width,
int height)
Selects the rectangle (in pixel units) relative to the sprite image that is used for
mouse touch detection.
|
void |
setMouseTouchRectangle(java.awt.Point center,
int width,
int height)
Same as setTouchRectangle(int spriteId, Rectangle rect)
for all sprites of this actor.
|
void |
setOnBottom()
Sets the actor at the last place in the scene of the actor class.
|
void |
setOnTop()
Sets the actor at the first place in the scene of actor class.
|
void |
setPixelLocation(java.awt.Point imageCenter)
Moves the center of the actor to the given pixel coordinates.
|
void |
setSlowDown(int factor)
Slows down the calling of act() by the given factor.
|
void |
setTileCollisionEnabled(boolean enable)
Enable/disable the detection of collisions with the tile collision candidates.
|
void |
setVertMirror(boolean enable)
If set, the sprite image shown is mirrored vertically.
|
void |
setX(int x)
Assigns a new current horizontal cell coordinate.
|
void |
setY(int y)
Assigns a new current vertical cell coordinate.
|
void |
show()
Turns on the visibility of the sprite with id 0.
|
void |
show(int spriteId)
Turns on the visibility of the sprite with given id.
|
void |
showNextSprite()
Increases the id of the currently visible sprite and makes this
sprite visible.
|
void |
showPreviousSprite()
Decreases the id of the currently visible sprite and makes this
sprite visible.
|
void |
turn(double angle)
Turns the moving direction by the given angle (clockwise for positive
angles, counterclockwise for negative angles).
|
public GameGrid gameGrid
public int nbCycles
public Actor(java.awt.image.BufferedImage... spriteImages)
spriteImages
- references to BufferedImages that contains the sprite imagespublic Actor(java.awt.image.BufferedImage spriteImage)
spriteImage
- references to BufferedImage that contains the sprite imagepublic Actor(boolean isRotatable, java.awt.image.BufferedImage spriteImage)
isRotatable
- if true, the actor's image may be rotated when the direction changesspriteImage
- reference to a BufferedImage that contains the sprite imagepublic Actor(boolean isRotatable, java.awt.image.BufferedImage... spriteImages)
isRotatable
- if true, the actor's image may be rotated when the direction changesspriteImages
- references to BufferedImages that contains the sprite imagespublic Actor()
public Actor(java.lang.String filename)
filename
- the path or URL to the image file displayed for this actor.public Actor(java.lang.String... filenames)
filenames
- the paths or URLs (one or more) to the image files displayed for this actor.public Actor(boolean isRotatable, java.lang.String filename)
isRotatable
- if true, the actor's image may be rotated when the direction changesfilename
- the path to the image file displayed for this actorpublic Actor(boolean isRotatable, java.lang.String... filenames)
isRotatable
- if true, the actor's image may be rotated when the direction changesfilenames
- the paths or URLs to the image files displayed for this actorpublic Actor(java.lang.String filename, int nbSprites)
filename
- the fully qualified path to the image file displayed for this actornbSprites
- the number of sprite images for the same actorpublic Actor(boolean isRotatable, java.lang.String filename, int nbSprites)
isRotatable
- if true, the actor's image may be rotated when the direction changesfilename
- the path or URL to the image file displayed for this actornbSprites
- the number of sprite images for the same actorpublic void setLocationOffset(java.awt.Point locationOffset)
locationOffset
- x,y displacement (x to the left, y downwards)public void setLocationOffset(int x, int y)
x
- displacement (positive x to the left)y
- displacement (positive y to downwards)public java.awt.Point getLocationOffset()
public GGBackground getBackground()
public void setX(int x)
x
- the x-coordinate (cell index)public void setY(int y)
y
- the y-coordinate (cell index)public void setLocation(Location location)
location
- the location (value copy)public void setPixelLocation(java.awt.Point imageCenter)
imageCenter
- the pixel coordinates of the image centerpublic int getX()
public int getY()
public Location getLocation()
public Location getLocationStart()
public int getXStart()
public int getYStart()
public double getDirectionStart()
public void setDirection(double direction)
direction
- the angle for the next movement (in degrees clockwise, 0 to east)public void setDirection(Location.CompassDirection compassDir)
compassDir
- the compass dirction for the next movementpublic int getRotationIndex()
public double getDirection()
public int getIntDirection()
public Location getNextMoveLocation()
public void move()
public void move(int distance)
distance
- the distance to the requested cell location in cell units.move()
public int getNbHorzCells()
public int getNbVertCells()
public void turn(double angle)
angle
- the angle to turn in degreespublic void act()
public void reset()
public void addBorderListener(GGBorderListener listener)
listener
- the GGBorderListener to registerpublic void nearBorder(Actor actor, Location location)
nearBorder
in interface GGBorderListener
actor
- the current actorlocation
- the border locationpublic boolean isInGrid()
public boolean isNearBorder()
public boolean isMoveValid()
public void removeSelf()
public void setSlowDown(int factor)
factor
- the factor greater or equal to 1 for delaying the
invocation of act()public int getSlowDown()
public void show()
public void show(int spriteId)
spriteId
- the sprite id that will become visible; visibility
remains unchanged if spriteId is less than zero or greater or equal to
the number of spritespublic void hide()
public int getIdVisible()
public boolean isVisible()
public void addCollisionActor(Actor partner)
partner
- the partner that is checked for collisionpublic int collide(Actor actor1, Actor actor2)
collide
in interface GGActorCollisionListener
actor1
- the first actoractor2
- the second actorpublic int collide(Actor actor, Location location)
collide
in interface GGTileCollisionListener
actor
- the colliding actorlocation
- the location of the colliding tile within the tile mappublic void addCollisionActors(java.util.ArrayList<Actor> partnerList)
partnerList
- a list of actors that are checked for collisionpublic java.util.ArrayList<Actor> getCollisionActors()
public void addCollisionTile(Location location)
location
- the location of the tile within the tile mappublic void addCollisionTiles(java.util.ArrayList<Location> locationList)
locationList
- a list of tile locations that are checked for collisionpublic java.util.ArrayList<Location> getCollisionTiles()
public void addActorCollisionListener(GGActorCollisionListener listener)
listener
- an actor collision listener; null to disable eventspublic void addTileCollisionListener(GGTileCollisionListener listener)
listener
- a tile collision listener; null to disable eventspublic void setHorzMirror(boolean enable)
enable
- if true, horizontal mirroring is enabledpublic void setVertMirror(boolean enable)
enable
- if true, vertical mirroring is enabledpublic boolean isHorzMirror()
public boolean isVertMirror()
public void setActEnabled(boolean enable)
enable
- if true, act() is invoked; otherwise act() is not invokedpublic boolean isActEnabled()
public void setActorCollisionEnabled(boolean enable)
enable
- if true (default), collisions will be notifiedpublic boolean isActorCollisionEnabled()
public void setTileCollisionEnabled(boolean enable)
enable
- if true (default), collisions will be notifiedpublic boolean isTileCollisionEnabled()
public java.util.ArrayList<Actor> getCollisionActorsInRange(double radius, java.lang.Class clazz, int spriteId)
radius
- the radius of the circle around the center of the current location in (fractional) cell unitsclazz
- the clazz the actors must belong to, if null, all actors are consideredpublic java.util.ArrayList<Actor> getNeighbours(double distance, java.lang.Class clazz)
distance
- the distance in (fractional) cell units publicclazz
- the class of the actors to look for; if null actors of all classes are includedpublic java.util.ArrayList<Actor> getNeighbours(double distance)
distance
- the distance in (fractional) cell units publicpublic boolean isRotatable()
public void setCollisionRectangle(int spriteId, java.awt.Point center, int width, int height)
spriteId
- the id of the spritecenter
- the rectangle center (zero at image center)width
- the width in pixel units of the rectangle (in x-direction)height
- the height in pixel units of the rectangle (in y-direction)public void setCollisionRectangle(java.awt.Point center, int width, int height)
center
- the rectangle center (zero at image center)width
- the width in pixel units of the rectangle (in x-direction)height
- the height in pixel units of the rectangle (in y-direction)public void setCollisionCircle(int spriteId, java.awt.Point center, int radius)
spriteId
- the id of the spritecenter
- circle center (zero at image center)radius
- the radius of the circle (in pixel units)public void setCollisionCircle(java.awt.Point center, int radius)
center
- the circle center (zero at image center)radius
- the radius of the circle (in pixel units)public void setCollisionLine(int spriteId, java.awt.Point startPoint, java.awt.Point endPoint)
spriteId
- the id of the spritestartPoint
- the start point of the line (zero at image center)endPoint
- the end point of the line (zero at image center)public void setCollisionLine(java.awt.Point startPoint, java.awt.Point endPoint)
startPoint
- the start point of the line (zero at image center)endPoint
- the end point of the line (zero at image center)public void setCollisionSpot(int spriteId, java.awt.Point spot)
spriteId
- the id of the spritespot
- the hot spot (zero at image center)public void setCollisionSpot(java.awt.Point spot)
spot
- the hot spot (zero at image center)public void setCollisionImage(int spriteId)
spriteId
- the id of the spritepublic void setCollisionImage()
public void setOnTop()
public void setOnBottom()
public int getNbCycles()
public static void delay(long time)
time
- the delay time (in ms)public void showNextSprite()
public void showPreviousSprite()
public java.awt.image.BufferedImage getCurrentImage()
public java.awt.image.BufferedImage getImage(int spriteId)
public java.awt.image.BufferedImage getImage()
public java.awt.Color getPixelColor(java.awt.Point pt)
pt
- the point where to look for the colorpublic java.awt.Point getPixelLocation()
setLocationOffset(Point locationOffset)
public int getWidth(int spriteId)
spriteId
- the id of the spritepublic int getHeight(int spriteId)
spriteId
- the id of the spritepublic static GGVector getRotatedPosition(GGVector position, java.awt.Point center, double angle)
position
- the vector to the current positioncenter
- the rotation center pointangle
- the rotating angle (in degrees, positive clockwise)public void rotate(Location centerLoc, double angle)
centerLoc
- the rotation center locationangle
- the rotation angle (in degrees, positive clockwise)public void rotate(java.awt.Point center, double angle)
center
- the rotation center pointangle
- the rotation angle (in degrees, positive clockwise)public void addMouseTouchListener(GGMouseTouchListener listener, int mouseEventMask)
listener
- the GGMouseTouchListener to registermouseEventMask
- an OR-combinaton of constants defined in class GGMousepublic void addMouseTouchListener(GGMouseTouchListener listener, int mouseEventMask, boolean onTopOnly)
listener
- the GGMouseTouchListener to registermouseEventMask
- an OR-combinaton of constants defined in class GGMouseonTopOnly
- if true, enable mouse touch event for the actor at top of others
(painted last) only; otherwise touch event of all actors is enabledpublic void setMouseTouchRectangle(int spriteId, java.awt.Point center, int width, int height)
spriteId
- the id of the spritecenter
- the rectangle center (zero at image center)width
- the width in pixel units of the rectangle (in x-direction)height
- the height in pixel units of the rectangle (in y-direction)public void setMouseTouchRectangle(java.awt.Point center, int width, int height)
center
- the rectangle center (zero at image center)width
- the width in pixel units of the rectangle (in x-direction)height
- the height in pixel units of the rectangle (in y-direction)public void setMouseTouchCircle(int spriteId, java.awt.Point center, int radius)
spriteId
- the id of the spritecenter
- circle center (zero at image center)radius
- the radius of the circle (in pixel units)public void setMouseTouchCircle(java.awt.Point center, int radius)
center
- circle center (zero at image center)radius
- the radius of the circle (in pixel units)public void setMouseTouchImage(int spriteId)
public void setMouseTouchImage()
public void setMouseTouchEnabled(boolean enable)
enable
- if true, mouse interactions will be notifiedpublic java.awt.image.BufferedImage getScaledImage(int spriteId, double factor, double angle)
spriteId
- the sprite id of the actor's sprite imagefactor
- the zoom factor (>1 zoom-in, <1 zoom-out)angle
- the rotation angle (in degrees clockwise, 0 to east)public java.awt.image.BufferedImage getScaledImage(double factor, double angle)
factor
- the zoom factor (>1 zoom-in, <1 zoom-out)angle
- the rotation angle (in degrees clockwise, 0 to east)@Deprecated public static java.awt.image.BufferedImage getScaledImage(java.awt.image.BufferedImage bi, double factor, double angle)
GGBitmap.getScaledImage(BufferedImage bi, double factor, double angle)
bi
- the buffered image to transformfactor
- the zoom factor (>1 zoom-in, <1 zoom-out)angle
- the rotation angle (in degrees clockwise)public int getNbSprites()
public boolean isRemoved()
public void displace(double ds)
ds
- the distance to displace the actor; if negative, displace in
opposite directionpublic java.awt.geom.Point2D.Double getDisplacePosition()
public void setDisplacePosition(java.awt.geom.Point2D.Double displacePosition)
displacePosition
- the double coordinates of the new position