Class Enemy2

java.lang.Object
  extended by Actor
      extended by QuantumObject
          extended by Spaceship
              extended by AIControlledSpaceship
                  extended by Enemy2

public class Enemy2
extends AIControlledSpaceship

A slower, but more heavy enemy with more hitpoins.


Field Summary
static int BASE_HP
           
static double BASE_SPEED
           
static double SPEED_DEVIATION
           
 
Fields inherited from class AIControlledSpaceship
initial_speed, speed_deviation
 
Fields inherited from class Spaceship
angled_guns, blink, blink_file, GUN_ANGLE, GUN_DISTANCE, guns, hitpoints, level, max_blink, max_hitpoints, n_guns, N_GUNS, side
 
Fields inherited from class QuantumObject
destroysOnNextTurn, disappear, mantissa, speed
 
Constructor Summary
Enemy2(int the_level)
           
 
Method Summary
 void act()
          A day in the life of a quantum object: 1.
 void setSide(int the_side)
           
protected  void setupImages()
          Sort-of abstract method available for overriddance [sic].
 
Methods inherited from class AIControlledSpaceship
beforeDestruction, getDeviation, getInitialSpeed, hit, setDeviation, setInitialSpeed
 
Methods inherited from class Spaceship
addGun, addHitpoints, angle, doBlink, fire, getBlinkFile, getHitpoints, getLevel, getMaxBlink, getMaxHitpoints, getNumberOfGuns, getSide, hit, removeGun, removeHitpoints, reorderGuns, setAngledGuns, setBlinkFile, setHitpoints, setLevel, setMaxBlink, setMaxHitpoints
 
Methods inherited from class QuantumObject
getDestroysOnNextTurn, getSpeed, move, setDestroysOnNextTurn, setSpeed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BASE_HP

public static final int BASE_HP
See Also:
Constant Field Values

BASE_SPEED

public static final double BASE_SPEED
See Also:
Constant Field Values

SPEED_DEVIATION

public static final double SPEED_DEVIATION
See Also:
Constant Field Values
Constructor Detail

Enemy2

public Enemy2(int the_level)
Method Detail

act

public void act()
Description copied from class: QuantumObject
A day in the life of a quantum object: 1. Maybe commit suicide (i. e. destroys itself when destroysOnNextTurn is true) 2. Do quantum object interactions with intersecting objects 3. -- Err... are you missing point 3?

Overrides:
act in class AIControlledSpaceship

setSide

public void setSide(int the_side)
Overrides:
setSide in class Spaceship

setupImages

protected void setupImages()
Description copied from class: Spaceship
Sort-of abstract method available for overriddance [sic]. Subclasses can implement this to set their sprite (back) to its default value. It's called whenever a reset to the default sprite is needed, e. g. after the blinking animation.

Overrides:
setupImages in class Spaceship
See Also:
Spaceship.doBlink()