Methapolis
0.27
|
Public Member Functions | |
RocketSprite (Micropolis engine, int xpos, int ypos, int xDest, int yDest, int ownerID) | |
RocketSprite (Micropolis engine, int xpos, int ypos, int xDest, int yDest, double speedFactor, int ownerID) | |
void | moveImpl () |
Public Member Functions inherited from micropolisj.engine.Sprite | |
void | setMicropolis (Micropolis micro) |
final void | move () |
final boolean | isVisible () |
void | remove () |
Static Public Member Functions | |
static int | getDir (int orgX, int orgY, int desX, int desY) |
Public Attributes | |
int | ownerID |
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 | |
void | explodeSprite () |
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) |
Private Member Functions | |
void | setStart (int x, int y) |
void | setDestination (int x, int y) |
double | stepsTilBoom () |
Private Attributes | |
int | destX |
int | destY |
double | speedFactor |
boolean | soundPlaying |
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 16 of file RocketSprite.java.
micropolisj.engine.RocketSprite.RocketSprite | ( | Micropolis | engine, |
int | xpos, | ||
int | ypos, | ||
int | xDest, | ||
int | yDest, | ||
int | ownerID | ||
) |
Definition at line 33 of file RocketSprite.java.
References micropolisj.engine.RocketSprite.ownerID.
micropolisj.engine.RocketSprite.RocketSprite | ( | Micropolis | engine, |
int | xpos, | ||
int | ypos, | ||
int | xDest, | ||
int | yDest, | ||
double | speedFactor, | ||
int | ownerID | ||
) |
Definition at line 37 of file RocketSprite.java.
References micropolisj.engine.RocketSprite.destX, micropolisj.engine.RocketSprite.destY, micropolisj.engine.Sprite.frame, micropolisj.engine.RocketSprite.getDir(), micropolisj.engine.Sprite.height, micropolisj.engine.Sprite.offx, micropolisj.engine.Sprite.offy, micropolisj.engine.RocketSprite.ownerID, micropolisj.engine.SpriteKind.ROC, micropolisj.engine.RocketSprite.setDestination(), micropolisj.engine.RocketSprite.setStart(), micropolisj.engine.RocketSprite.soundPlaying, micropolisj.engine.RocketSprite.speedFactor, micropolisj.engine.Sprite.width, micropolisj.engine.Sprite.x, and micropolisj.engine.Sprite.y.
|
protected |
Replaces this sprite with an exploding sprite.
Reimplemented from micropolisj.engine.Sprite.
Definition at line 125 of file RocketSprite.java.
References micropolisj.engine.Sound.EXPLOSION_HIGH, micropolisj.engine.Sprite.frame, micropolisj.engine.Micropolis.getPlayerInfo(), micropolisj.research.ResearchData.getRocketRadius(), micropolisj.engine.RocketSprite.ownerID, micropolisj.engine.PlayerInfo.researchData, micropolisj.engine.MicropolisMessage.ROCKETCRASH_REPORT, micropolisj.engine.Sprite.x, and micropolisj.engine.Sprite.y.
Referenced by micropolisj.engine.RocketSprite.moveImpl().
|
static |
Computes direction from one point to another.
Reimplemented from micropolisj.engine.Sprite.
Definition at line 69 of file RocketSprite.java.
Referenced by micropolisj.engine.RocketSprite.moveImpl(), and micropolisj.engine.RocketSprite.RocketSprite().
|
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 135 of file RocketSprite.java.
References micropolisj.engine.RocketSprite.destX, micropolisj.engine.RocketSprite.destY, micropolisj.engine.Sound.DUBSPLOSION, micropolisj.engine.RocketSprite.explodeSprite(), micropolisj.engine.Sprite.frame, micropolisj.engine.Speed.getAnimationsPerSecond(), micropolisj.engine.RocketSprite.getDir(), micropolisj.engine.Micropolis.simSpeed, micropolisj.engine.RocketSprite.soundPlaying, micropolisj.engine.RocketSprite.speedFactor, micropolisj.engine.RocketSprite.stepsTilBoom(), micropolisj.engine.Sprite.x, and micropolisj.engine.Sprite.y.
|
private |
Definition at line 63 of file RocketSprite.java.
References micropolisj.engine.RocketSprite.destX, micropolisj.engine.RocketSprite.destY, and micropolisj.engine.Sprite.tilePosToPixel().
Referenced by micropolisj.engine.RocketSprite.RocketSprite().
|
private |
Definition at line 58 of file RocketSprite.java.
References micropolisj.engine.Sprite.tilePosToPixel().
Referenced by micropolisj.engine.RocketSprite.RocketSprite().
|
private |
Definition at line 116 of file RocketSprite.java.
References micropolisj.engine.RocketSprite.destX, micropolisj.engine.RocketSprite.destY, micropolisj.engine.RocketSprite.speedFactor, micropolisj.engine.Sprite.x, and micropolisj.engine.Sprite.y.
Referenced by micropolisj.engine.RocketSprite.moveImpl().
|
private |
Definition at line 17 of file RocketSprite.java.
Referenced by micropolisj.engine.RocketSprite.moveImpl(), micropolisj.engine.RocketSprite.RocketSprite(), micropolisj.engine.RocketSprite.setDestination(), and micropolisj.engine.RocketSprite.stepsTilBoom().
|
private |
Definition at line 18 of file RocketSprite.java.
Referenced by micropolisj.engine.RocketSprite.moveImpl(), micropolisj.engine.RocketSprite.RocketSprite(), micropolisj.engine.RocketSprite.setDestination(), and micropolisj.engine.RocketSprite.stepsTilBoom().
int micropolisj.engine.RocketSprite.ownerID |
Definition at line 22 of file RocketSprite.java.
Referenced by micropolisj.engine.RocketSprite.explodeSprite(), and micropolisj.engine.RocketSprite.RocketSprite().
|
private |
Definition at line 20 of file RocketSprite.java.
Referenced by micropolisj.engine.RocketSprite.moveImpl(), and micropolisj.engine.RocketSprite.RocketSprite().
|
private |
Definition at line 19 of file RocketSprite.java.
Referenced by micropolisj.engine.RocketSprite.moveImpl(), micropolisj.engine.RocketSprite.RocketSprite(), and micropolisj.engine.RocketSprite.stepsTilBoom().