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

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.Biglazer

public final class Biglazer
extends Ship

Biglazer is a enemy ship that follows the player on the x-axis.


Field Summary
private static float AWAKE_SPEED
           
private static float FOLLOW_SPEED
           
private static int HIT_POINTS
           
private static float SLEEP_SPEED
           
 
Fields inherited from class se.liu.student.kimgr905.tilegame.sprites.Sprite
anim, STATE_DEAD, STATE_EXPLODING, STATE_NORMAL, STATE_SHOOTING
 
Constructor Summary
Biglazer(Animation normal, Animation exploding)
          Creates a new Biglazer with the specified animations.
 
Method Summary
 void changePath(Player player)
          Makes the ship follow the player on the x-axis.
 void wakeUp()
          Awakens the ship.
 
Methods inherited from class se.liu.student.kimgr905.tilegame.sprites.Ship
changePath, clone, getHitPoints, hit, isAwake, setHitPoints, setState, shoot, update
 
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 static final int HIT_POINTS
See Also:
Constant Field Values

SLEEP_SPEED

private static final float SLEEP_SPEED
See Also:
Constant Field Values

AWAKE_SPEED

private static final float AWAKE_SPEED
See Also:
Constant Field Values

FOLLOW_SPEED

private static final float FOLLOW_SPEED
See Also:
Constant Field Values
Constructor Detail

Biglazer

public Biglazer(Animation normal,
                Animation exploding)
Creates a new Biglazer with the specified animations.

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

changePath

public void changePath(Player player)
Makes the ship follow the player on the x-axis.

Overrides:
changePath in class Ship
Parameters:
player - the player

wakeUp

public void wakeUp()
Description copied from class: Ship
Awakens the ship.

Overrides:
wakeUp in class Ship