se.liu.student.kimgr905.tilegame.sprites
Class Minilazer

java.lang.Object
  extended by se.liu.student.kimgr905.tilegame.sprites.Sprite
      extended by se.liu.student.kimgr905.tilegame.sprites.Ship
          extended by se.liu.student.kimgr905.tilegame.sprites.Minilazer

public final class Minilazer
extends Ship

Minilazer is a ship that follows a certain path.


Field Summary
private  int CHANGE_BACK
           
private  int CHANGE_PATH
           
private  int counter
           
private  int HIT_POINTS
           
private  float MAX_SPEED
           
 
Fields inherited from class se.liu.student.kimgr905.tilegame.sprites.Sprite
anim, STATE_DEAD, STATE_EXPLODING, STATE_NORMAL, STATE_SHOOTING
 
Constructor Summary
Minilazer(Animation normal, Animation exploding)
          Creates a minilazer ship with the specified animations.
 
Method Summary
 void changePath()
          Makes the ship change path after the counter reaches CHANGE_PATH, and change back when it goes to CHANGE_BACK.
 
Methods inherited from class se.liu.student.kimgr905.tilegame.sprites.Ship
changePath, clone, getHitPoints, hit, isAwake, setHitPoints, setState, shoot, update, wakeUp
 
Methods inherited from class se.liu.student.kimgr905.tilegame.sprites.Sprite
getHeight, getImage, getState, getVelocityX, getVelocityY, getWidth, getX, getY, isAlive, setVelocityX, setVelocityY, setX, setY
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HIT_POINTS

private final int HIT_POINTS
See Also:
Constant Field Values

MAX_SPEED

private final float MAX_SPEED
See Also:
Constant Field Values

counter

private int counter

CHANGE_PATH

private final int CHANGE_PATH
See Also:
Constant Field Values

CHANGE_BACK

private final int CHANGE_BACK
See Also:
Constant Field Values
Constructor Detail

Minilazer

public Minilazer(Animation normal,
                 Animation exploding)
Creates a minilazer ship with the specified animations.

Parameters:
normal - normal animation
exploding - exploding animation
Method Detail

changePath

public void changePath()
Makes the ship change path after the counter reaches CHANGE_PATH, and change back when it goes to CHANGE_BACK.

UPDATE THIS

Overrides:
changePath in class Ship