Methapolis
0.27
|
Public Member Functions | |
ShipSprite (Micropolis engine, int xpos, int ypos, int edge) | |
void | moveImpl () |
Public Member Functions inherited from micropolisj.engine.Sprite | |
void | setMicropolis (Micropolis micro) |
final void | move () |
final boolean | isVisible () |
void | remove () |
Static Public Attributes | |
static final int | NORTH_EDGE = 5 |
static final int | EAST_EDGE = 7 |
static final int | SOUTH_EDGE = 1 |
static final int | WEST_EDGE = 3 |
Additional Inherited Members | |
Public Attributes inherited from micropolisj.engine.Sprite | |
SpriteKind | kind |
int | offx |
int | offy |
int | width = 32 |
int | height = 32 |
int | frame |
int | x |
int | y |
int | lastX |
int | lastY |
Protected Member Functions inherited from micropolisj.engine.Sprite | |
Sprite (Micropolis engine, SpriteKind kind) | |
final int | getChar (int x, int y) |
int | tilePosToPixel (int x) |
int | pixelToTilePos (int x) |
void | explodeSprite () |
Implements the cargo ship. The cargo ship is created if the city contains a sea port. It follows the river "channel" that was originally generated. It frequently turns around.
Definition at line 19 of file ShipSprite.java.
micropolisj.engine.ShipSprite.ShipSprite | ( | Micropolis | engine, |
int | xpos, | ||
int | ypos, | ||
int | edge | ||
) |
Definition at line 37 of file ShipSprite.java.
References micropolisj.engine.Sprite.frame, micropolisj.engine.Sprite.height, micropolisj.engine.Sprite.offx, micropolisj.engine.Sprite.offy, micropolisj.engine.SpriteKind.SHI, micropolisj.engine.Sprite.width, micropolisj.engine.Sprite.x, and micropolisj.engine.Sprite.y.
|
virtual |
For subclasses to override. Actually does the movement and animation of this particular sprite. Setting this.frame to zero will cause the sprite to be unallocated.
Implements micropolisj.engine.Sprite.
Definition at line 53 of file ShipSprite.java.
References micropolisj.engine.Sprite.explodeSprite(), micropolisj.engine.Sprite.frame, micropolisj.engine.Micropolis.getTile(), micropolisj.engine.Sound.HONKHONK_LOW, micropolisj.engine.Micropolis.testBounds(), micropolisj.engine.Sprite.x, and micropolisj.engine.Sprite.y.
|
static |
Definition at line 33 of file ShipSprite.java.
|
static |
Definition at line 32 of file ShipSprite.java.
|
static |
Definition at line 34 of file ShipSprite.java.
|
static |
Definition at line 35 of file ShipSprite.java.