Methapolis
0.27
|
Public Member Functions | |
SpaceshipSprite (Micropolis engine, int xpos, int ypos) | |
SpaceshipSprite (Micropolis engine, int xpos, int ypos, double speedFactor) | |
void | moveImpl () |
Public Member Functions inherited from micropolisj.engine.Sprite | |
void | setMicropolis (Micropolis micro) |
final void | move () |
final boolean | isVisible () |
void | remove () |
Private Attributes | |
int | destX |
int | destY |
double | speedFactor |
boolean | soundPlaying |
MP3 | sound |
int | prevDist |
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 airplane. The airplane appears if the city contains an airport. It first takes off, then flies around randomly, occassionally crashing.
Definition at line 19 of file SpaceshipSprite.java.
micropolisj.engine.SpaceshipSprite.SpaceshipSprite | ( | Micropolis | engine, |
int | xpos, | ||
int | ypos | ||
) |
Definition at line 28 of file SpaceshipSprite.java.
micropolisj.engine.SpaceshipSprite.SpaceshipSprite | ( | Micropolis | engine, |
int | xpos, | ||
int | ypos, | ||
double | speedFactor | ||
) |
Definition at line 32 of file SpaceshipSprite.java.
References micropolisj.engine.SpaceshipSprite.destX, micropolisj.engine.SpaceshipSprite.destY, micropolisj.engine.Sprite.frame, micropolisj.engine.Sprite.height, micropolisj.engine.Micropolis.mainWindow, micropolisj.engine.Sprite.offx, micropolisj.engine.Sprite.offy, micropolisj.engine.SpaceshipSprite.prevDist, micropolisj.engine.SpaceshipSprite.soundPlaying, micropolisj.engine.SpriteKind.SPACESHIP, micropolisj.engine.SpaceshipSprite.speedFactor, 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 60 of file SpaceshipSprite.java.
References micropolisj.engine.SpaceshipSprite.destX, micropolisj.engine.SpaceshipSprite.destY, micropolisj.util.MP3.play(), micropolisj.engine.SpaceshipSprite.prevDist, micropolisj.engine.SpaceshipSprite.sound, micropolisj.engine.SpaceshipSprite.soundPlaying, micropolisj.engine.Sound.SPACESHIP_LAUNCH, micropolisj.engine.SpaceshipSprite.speedFactor, micropolisj.engine.Sprite.x, and micropolisj.engine.Sprite.y.
|
private |
Definition at line 20 of file SpaceshipSprite.java.
Referenced by micropolisj.engine.SpaceshipSprite.moveImpl(), and micropolisj.engine.SpaceshipSprite.SpaceshipSprite().
|
private |
Definition at line 21 of file SpaceshipSprite.java.
Referenced by micropolisj.engine.SpaceshipSprite.moveImpl(), and micropolisj.engine.SpaceshipSprite.SpaceshipSprite().
|
private |
Definition at line 25 of file SpaceshipSprite.java.
Referenced by micropolisj.engine.SpaceshipSprite.moveImpl(), and micropolisj.engine.SpaceshipSprite.SpaceshipSprite().
|
private |
Definition at line 24 of file SpaceshipSprite.java.
Referenced by micropolisj.engine.SpaceshipSprite.moveImpl().
|
private |
Definition at line 23 of file SpaceshipSprite.java.
Referenced by micropolisj.engine.SpaceshipSprite.moveImpl(), and micropolisj.engine.SpaceshipSprite.SpaceshipSprite().
|
private |
Definition at line 22 of file SpaceshipSprite.java.
Referenced by micropolisj.engine.SpaceshipSprite.moveImpl(), and micropolisj.engine.SpaceshipSprite.SpaceshipSprite().