group1.model.gameobject.enemy
Class ContactEnemy

java.lang.Object
  extended by group1.model.gameobject.GameObj
      extended by group1.model.gameobject.LivingObj
          extended by group1.model.gameobject.enemy.Enemy
              extended by group1.model.gameobject.enemy.ContactEnemy
Direct Known Subclasses:
Enemy001, Enemy002, Enemy003

public class ContactEnemy
extends Enemy

ContactEnemy is an Enemy that has the power to damage other objects by touching them.

Usage: (1) construct this ContactEnemy; (2) add BOTH this ContactEnemy and its Contact to Environment, USING THE FUNCTION PROVIDED BY THIS CLASS.


Field Summary
 
Fields inherited from class group1.model.gameobject.LivingObj
contactDamageMultiplier, curr_hp, fireDamageMultiplier, katanaDamageMultiplier, laserDamageMultiplier, max_hp, ourFacingDirection, tomahawkDamageMultiplier, VALID_WEAPON_CODES
 
Fields inherited from class group1.model.gameobject.GameObj
acceleration, ENEMY_TEAM, GRID_SPACE_SIZE, id, isMovable, JEFF_TEAM, myState, NO_TEAM, regions, shape, THICKNESS, velocity
 
Constructor Summary
ContactEnemy()
          Default constructor.
ContactEnemy(double x, double y, PictureList p)
          Constructor.
 
Method Summary
 void addMeToEnvironment(Environment env, double x, double y)
          PLEASE USE THIS FUNCTION TO ADD ME TO AN Environment.
 Contact getContact()
          Gets the Contact that inflicts damage on other objects.
 
Methods inherited from class group1.model.gameobject.enemy.Enemy
attackPower, attackProbabilityDenominator, attackProbabilityNumerator, changeWeaponProbabilityDenominator, changeWeaponProbabilityNumerator, die, getRandomGenerator, makeStandardEnemyRegions, maxRunSpeed, maxWalkSpeed, move, projectileSpeed, runAcceleration, setPointValue, setRandomGenerator, shouldBeMoving, startingHP, walkAcceleration, walkSpeed
 
Methods inherited from class group1.model.gameobject.LivingObj
changeDirectionFacing, changeWeapon, decrementInvincibilityCounter, facingWhichDirection, getCurrentWeapon, getCurrHP, getMaxHP, hasFireball, hasKatana, hasLaser, hasTomahawk, hasWeapon, hasWeaponIndex, isInvincible, setInvincibilityPeriod, setVulnerable, takeDamage
 
Methods inherited from class group1.model.gameobject.GameObj
addRegion, addRegion, equals, getAcceleration, getAccelerationX, getAccelerationY, getFilm, getHeight, getID, getNumRegions, getPictureList, getPosition, getPositionX, getPositionY, getRectangle, getRegion, getState, getTeam, getVelocity, getVelocityX, getVelocityY, getWidth, giveDamage, intersectRegions, isMovable, isSameState, makeBottomSideRegion, makeLeftSideRegion, makeRegions, makeRightSideRegion, makeSolid, makeSolidTop, makeTopSideRegion, playAudio, resizeBottomRegion, resizeLeftRegion, resizeRightRegion, resizeTopRegion, setAcceleration, setAcceleration, setAccelerationX, setAccelerationY, setID, setPictureList, setPosition, setPosition, setPositionX, setPositionY, setRectangle, setSize, setState, setTeam, setVelocity, setVelocity, setVelocityX, setVelocityY, shouldBeBlinking, stopHorizontal, stopVertical
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContactEnemy

public ContactEnemy(double x,
                    double y,
                    PictureList p)
Constructor.

Parameters:
x - The x-coordinate of the position.
y - The y-coordinate of the position.

ContactEnemy

public ContactEnemy()
Default constructor.

Method Detail

getContact

public Contact getContact()
Gets the Contact that inflicts damage on other objects.


addMeToEnvironment

public void addMeToEnvironment(Environment env,
                               double x,
                               double y)
PLEASE USE THIS FUNCTION TO ADD ME TO AN Environment. Just calling Environment's addObject(...) may deprive this ContactEnemy of contact damage power!!!!!