games.SpaceInvaders.controllers
Class AlienAI

java.lang.Object
  extended by vooga.gameEngine.game.GameRelatedObject
      extended by vooga.gameEngine.controller.GameRelatedController
          extended by games.SpaceInvaders.controllers.AlienAI
All Implemented Interfaces:
java.io.Serializable, java.util.EventListener, AddRemoveGameObjectListener, TimeListener

public class AlienAI
extends GameRelatedController
implements TimeListener, AddRemoveGameObjectListener

Author:
Justin C. Klaassen
See Also:
Serialized Form

Constructor Summary
AlienAI(AbstractGame game, Ship ship1, Ship ship2, TimingController tc, CameraController cc)
           
AlienAI(AbstractGame game, Ship ship, TimingController tc, CameraController cc)
           
 
Method Summary
 void addAlien(GameItem a)
           
 void disableEndingConditions()
           
 void processAddRequest(AddGameObjectEvent e)
          Optionally checks whether it is okay to add the item requesting addition to the game and then adds that item to the game.
 void processRemoveRequest(RemoveGameObjectEvent e)
          Removes the source object of the RemoveGameObjectEvent parameter or checks to see if this remove is possible before taking action.
 void setBombRate(long rate)
           
 void setMoveDownRate(long rate)
           
 void setMoveDownStep(double step)
           
 void timeUpdated(TimeUpdateEvent t)
          Receives an TimeUpdateEvent for the implementing class to process.
 
Methods inherited from class vooga.gameEngine.game.GameRelatedObject
addEventListener, clearListeners, equals, fire, fire, fire, getEventListeners, getID, getListenerCount, removeEventListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlienAI

public AlienAI(AbstractGame game,
               Ship ship,
               TimingController tc,
               CameraController cc)

AlienAI

public AlienAI(AbstractGame game,
               Ship ship1,
               Ship ship2,
               TimingController tc,
               CameraController cc)
Method Detail

addAlien

public void addAlien(GameItem a)

setMoveDownStep

public void setMoveDownStep(double step)

setMoveDownRate

public void setMoveDownRate(long rate)

setBombRate

public void setBombRate(long rate)

timeUpdated

public void timeUpdated(TimeUpdateEvent t)
Description copied from interface: TimeListener
Receives an TimeUpdateEvent for the implementing class to process.

Specified by:
timeUpdated in interface TimeListener
Parameters:
t - is the TimeUpdateEvent

processAddRequest

public void processAddRequest(AddGameObjectEvent e)
Description copied from interface: AddRemoveGameObjectListener
Optionally checks whether it is okay to add the item requesting addition to the game and then adds that item to the game.

Specified by:
processAddRequest in interface AddRemoveGameObjectListener
Parameters:
e - The event which holds a GameItem requesting to be added to the game.

processRemoveRequest

public void processRemoveRequest(RemoveGameObjectEvent e)
Description copied from interface: AddRemoveGameObjectListener
Removes the source object of the RemoveGameObjectEvent parameter or checks to see if this remove is possible before taking action.

Specified by:
processRemoveRequest in interface AddRemoveGameObjectListener
Parameters:
e - The event whose source is the Object desiring removal

disableEndingConditions

public void disableEndingConditions()