Methapolis
0.27
|
Public Member Functions | |
TrainSprite (Micropolis engine, int xpos, int ypos) | |
void | moveImpl () |
Public Member Functions inherited from micropolisj.engine.Sprite | |
void | setMicropolis (Micropolis micro) |
final void | move () |
final boolean | isVisible () |
void | remove () |
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 commuter train. The commuter train appears if the city has a certain amount of railroad track. It wanders around the city's available track randomly.
Definition at line 19 of file TrainSprite.java.
micropolisj.engine.TrainSprite.TrainSprite | ( | Micropolis | engine, |
int | xpos, | ||
int | ypos | ||
) |
Definition at line 41 of file TrainSprite.java.
References micropolisj.engine.Sprite.offx, micropolisj.engine.Sprite.offy, micropolisj.engine.SpriteKind.TRA, 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 52 of file TrainSprite.java.
References micropolisj.engine.Sprite.frame, micropolisj.engine.Sprite.getChar(), micropolisj.engine.Sprite.x, and micropolisj.engine.Sprite.y.