|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object group1.model.gameobject.GameObj group1.model.gameobject.LivingObj group1.model.gameobject.Jeff
public class Jeff
Jeff, the hero of the game. A unique GameObj that determines its movement entirely on user input.
Field Summary |
---|
Fields inherited from class group1.model.gameobject.LivingObj |
---|
contactDamageMultiplier, curr_hp, fireDamageMultiplier, katanaDamageMultiplier, laserDamageMultiplier, max_hp, tomahawkDamageMultiplier, VALID_WEAPON_CODES |
Fields inherited from class group1.model.gameobject.GameObj |
---|
acceleration, ENEMY_TEAM, GRID_SPACE_SIZE, id, isMovable, JEFF_TEAM, NO_TEAM, regions, shape, velocity |
Constructor Summary | |
---|---|
Jeff()
Default constructor. |
|
Jeff(double x,
double y,
PictureList p)
Constructor. |
Method Summary | |
---|---|
void |
changeWeapon(char nextWeapon)
Change the weapon to the specified one. |
void |
fillHP()
Fill Jeff's HP. |
XYPair |
move(Environment env)
Movement function that should be called by the Enviroment at each time click. |
void |
setToAttack(boolean attack)
Set Jeff to attack. |
void |
setToChangeWeapons(boolean change)
Set Jeff to change his weapon. |
void |
setToDuck(boolean duck)
Set Jeff to duck. |
void |
setToExtendJump(boolean extend)
Set Jeff to extend his jump. |
void |
setToJump(boolean jump)
Set Jeff to jump. |
void |
setToMove(Direction direction)
Set Jeff to move left, right, or neither. |
void |
setToMoveOnLadder(LadderDirection direction)
Set Jeff to move up a ladder, down a ladder, or neither. |
void |
setToRun(boolean run)
Set Jeff to run. |
Methods inherited from class group1.model.gameobject.LivingObj |
---|
die, getCurrentWeapon, getCurrHP, getMaxHP, hasFireball, hasKatana, hasLaser, hasTomahawk, hasWeapon, hasWeaponIndex, takeDamage |
Methods inherited from class group1.model.gameobject.GameObj |
---|
addRegion, addRegion, equals, getAcceleration, getAccelerationX, getAccelerationY, getFilm, getFilm, getHeight, getID, getNumRegions, getPictureList, getPosition, getPositionX, getPositionY, getRectangle, getRegion, getState, getTeam, getVelocity, getVelocityX, getVelocityY, getWidth, intersectRegions, isMovable, isSameState, makeRegions, makeSolid, makeSolidTop, setAcceleration, setAcceleration, setAccelerationX, setAccelerationY, setID, setPictureList, setPosition, setPosition, setPositionX, setPositionY, setRectangle, setSize, setState, setTeam, setVelocity, setVelocity, setVelocityX, setVelocityY, stopHorizontal, stopVertical |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Jeff()
public Jeff(double x, double y, PictureList p)
x
- The x-coordinate of the position.y
- The y-coordinate of the position.Method Detail |
---|
public XYPair move(Environment env)
move
in class GameObj
env
- The environment this object is moving in.
public void changeWeapon(char nextWeapon)
changeWeapon
in class LivingObj
nextWeapon
- A value representing the next weapon. Should be 'k', 'f', 'l', 't', or ' '.public void setToJump(boolean jump)
jump
- Whether or not Jeff should be trying to jump.public void setToExtendJump(boolean extend)
extend
- Whether or not Jeff should be trying to extend his jump.public void setToAttack(boolean attack)
attack
- Whether or not Jeff should be trying to attack.public void setToRun(boolean run)
run
- Whether or not Jeff should be trying to run.public void setToChangeWeapons(boolean change)
run
- Whether or not Jeff should be trying to change his weapon.public void setToDuck(boolean duck)
run
- Whether or not Jeff should be trying to duck.public void setToMove(Direction direction)
direction
- The direction Jeff should move.public void setToMoveOnLadder(LadderDirection direction)
direction
- The direction Jeff should move on any ladders he happens to be near.public void fillHP()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |