Class EnemyEntity<S extends Observable<S>>
java.lang.Object
nz.ac.vuw.ecs.swen225.gp22.domain.Observable<S>
nz.ac.vuw.ecs.swen225.gp22.domain.Entity<S>
nz.ac.vuw.ecs.swen225.gp22.domain.EnemyEntity<S>
- Direct Known Subclasses:
 GummyGuard
Base class for enemies, has a speed property so app
 knows how often to ping the enemy.
- Author:
 - Abdul
 
- 
Nested Class Summary
Nested classes/interfaces inherited from class nz.ac.vuw.ecs.swen225.gp22.domain.Entity
Entity.Action, Entity.Direction - 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic HashMap<Entity.Direction,BufferedImage> Map used by renderer to get image based on direction. - 
Constructor Summary
ConstructorsConstructorDescriptionEnemyEntity(Maze.Point entityPos, Entity.Direction facingDir, int speed) Default constructor, sets the position, direction, and speed of the enemy. - 
Method Summary
Methods inherited from class nz.ac.vuw.ecs.swen225.gp22.domain.Entity
deleteEntity, getDir, getPos, hasAction, id, move, move, move, move, moveAndTurn, ping, pollAction, setDir, setPos, unpingMethods inherited from class nz.ac.vuw.ecs.swen225.gp22.domain.Observable
addObserver, removeObserver, updateObservers 
- 
Field Details
- 
imageMap
Map used by renderer to get image based on direction. 
 - 
 - 
Constructor Details
- 
EnemyEntity
Default constructor, sets the position, direction, and speed of the enemy.- Parameters:
 entityPos- Point to set the position field to.facingDir- Direction to set the direction field to.speed- How often the monster gets pinged.
 
 - 
 - 
Method Details
- 
getSpeed
public final int getSpeed()- Returns:
 - The speed of the enemy.
 
 
 -