|
|||||||||
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 |
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)
Constructor. |
Method Summary | |
---|---|
void |
changeWeapon(char nextWeapon)
Change the weapon to the specified one. |
XYPair |
move(Environment env)
Movement function that should be called by the Enviroment at each time click. |
Methods inherited from class group1.model.gameobject.LivingObj |
---|
die, getCurrHP, getMaxHP, takeDamage |
Methods inherited from class group1.model.gameobject.GameObj |
---|
addRegion, addRegion, getAcceleration, getAccelerationX, getAccelerationY, getHeight, getID, getNumRegions, getPosition, getPositionX, getPositionY, getRectangle, getRegion, getTeam, getVelocity, getVelocityX, getVelocityY, getWidth, intersectRegions, isMovable, makeRegions, makeSolid, setAcceleration, setAcceleration, setAccelerationX, setAccelerationY, setID, setPosition, setPosition, setPositionX, setPositionY, setRectangle, setSize, setTeam, setVelocity, setVelocity, setVelocityX, setVelocityY, stopHorizontal, stopVertical |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Jeff()
public Jeff(double x, double y)
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)
nextWeapon
- A value representing the next weapon. Should be 'k', 'f', 'l', 't', or ' '.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |