Class SpriteUfo

java.lang.Object
  |
  +--Sprite
        |
        +--SpriteUfo

class SpriteUfo
extends Sprite


Field Summary
(package private)  double ageDoneShootwait
          Next time you can shoot a missile.
(package private) static int newUfoScore
          The next score the player has to pass to make a new Ufo come to life.
(package private) static int UFO_PASSES
          Number of times a Ufo gets to cross the screen.
(package private) static int UFO_POINTS
          Points for shooting a Ufo.
(package private)  int ufoPassesLeft
          The ufo gets a fixed number of passes across the screen.
 
Fields inherited from class Sprite
acceleration, active, age, ageDone, angle, angularAcceleration, bounce, edgecolor, fillcolor, fillflag, game, mass, maxspeed, ownerApp, position, positiontransform, radius, shape, shapetransform, soundplaying, velocity
 
Constructor Summary
SpriteUfo(RealPixelConverter rtopc)
           
 
Method Summary
 void fire(RealPixelConverter rtopc)
           
 void loopsound(boolean onoff)
          Toggles the saucerSound.
 void reset(RealPixelConverter rtopc)
          Randomly set flying saucer at an edge of the screen.
 void stop()
          Turn off the UFO, set ufoPassesLeft to 0.
 void update(RealPixelConverter rtopc)
          The update method can be overloaded by the child sprite.
 
Methods inherited from class Sprite
advance, draw, explode, fixRadius, isColliding, isTouching, mass, radius, randomizeFillcolor, render, setFakeRadius, wrapandbounce
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

UFO_PASSES

static final int UFO_PASSES
Number of times a Ufo gets to cross the screen. 5.

UFO_POINTS

static final int UFO_POINTS
Points for shooting a Ufo. 250.

ufoPassesLeft

int ufoPassesLeft
The ufo gets a fixed number of passes across the screen.

newUfoScore

static int newUfoScore
The next score the player has to pass to make a new Ufo come to life.

ageDoneShootwait

double ageDoneShootwait
Next time you can shoot a missile.
Constructor Detail

SpriteUfo

public SpriteUfo(RealPixelConverter rtopc)
Method Detail

reset

public void reset(RealPixelConverter rtopc)
Randomly set flying saucer at an edge of the screen.
Overrides:
reset in class Sprite

loopsound

public void loopsound(boolean onoff)
Toggles the saucerSound.
Overrides:
loopsound in class Sprite

update

public void update(RealPixelConverter rtopc)
Description copied from class: Sprite
The update method can be overloaded by the child sprite. It needs the RealPixelCoverter argument because it will sometimes reset anothe sprite (like a bullet or an explosion).
Overrides:
update in class Sprite

fire

public void fire(RealPixelConverter rtopc)

stop

public void stop()
Turn off the UFO, set ufoPassesLeft to 0.
Overrides:
stop in class Sprite