|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hockey.api.Player | +--hockey.api.GoalKeeper
The goal-keeper in your team should extend this class!
Implements the IGoalKeeper
and
IGoalKeeperControl
interfaces to give you full control and
information of the goal-keeper.
Additionally it has some methods you must define to give information
about your goal-keeper, and some convenience methods for easier control.
Most important is the step
method that controls your
goal-keeper.
Player
,
IObject
,
IGoalKeeper
,
IPlayer
,
IGoalKeeperControl
,
IPlayerControl
Field Summary |
Fields inherited from interface hockey.api.IGoalKeeperControl |
MAX_GLIDE, MAX_THROW_SPEED |
Fields inherited from interface hockey.api.IPlayerControl |
ACCELERATION, MAX_SHOT_SPEED, MAX_SPEED, MAX_STICK_ANGLE, MAX_STICK_R, MAX_TURN_SPEED, MIN_STICK_ANGLE, MIN_STICK_R |
Constructor Summary | |
GoalKeeper()
|
Method Summary | |
int |
getGlide()
Returns the goal-keeper's sidewards glide speed, in cm/s. |
IObject |
getGlove()
Returns the current position of the goal-keeper's glove, as an IObject . |
int |
getTargetGlide()
Returns the target glide speed. |
void |
glide(int glideSpeed)
Accelerate gliding sidewards to the given speed. |
void |
setGoalKeeperControl(IGoalKeeper impl,
IGoalKeeperControl ctrl)
This method is used internally to receive the IGoalKeeper
and IGoalKeeperControl associated with this goal-keeper. |
void |
skate(int x,
int y,
int speed)
Accelerate to a given speed and move towards a given position by skating or gliding, but without turning. |
void |
skate(IObject o,
int speed)
Accelerate to a given speed and turn towards a given IObject with maximum turn speed. |
Methods inherited from class hockey.api.Player |
faceOff, getAimOnStick, getGoalKeeper, getHeading, getIndex, getName, getNumber, getPlayer, getPuck, getScore, getSpeed, getStick, getStickAngle, getStickR, getStickX, getStickY, getTargetHeading, getTargetSpeed, getTargetStickAngle, getTargetStickR, getTurnSpeed, getX, getY, hasPuck, init, isLeftHanded, isOpponent, moveStick, penaltyShot, setAimOnStick, setDebugPoint, setMessage, setPlayerControl, shoot, shoot, shoot, showDebugPoint, skate, step, turn, turn, turn |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface hockey.api.IPlayer |
getIndex, getStick, getStickAngle, getStickR, getStickX, getStickY, hasPuck, isLeftHanded, isOpponent |
Methods inherited from interface hockey.api.IObject |
getHeading, getSpeed, getX, getY |
Methods inherited from interface hockey.api.IPlayerControl |
getAimOnStick, getGoalKeeper, getPlayer, getPuck, getScore, getTargetHeading, getTargetSpeed, getTargetStickAngle, getTargetStickR, getTurnSpeed, moveStick, setAimOnStick, setDebugPoint, setMessage, shoot, showDebugPoint, skate, turn |
Constructor Detail |
public GoalKeeper()
Method Detail |
public final void setGoalKeeperControl(IGoalKeeper impl, IGoalKeeperControl ctrl)
IGoalKeeper
and IGoalKeeperControl
associated with this goal-keeper.
impl
- the goal-keeper's IGoalKeeper
.ctrl
- the goal-keeper's IGoalKeeperControl
.public int getGlide()
IGoalKeeper
getGlide
in interface IGoalKeeper
public IObject getGlove()
IGoalKeeper
IObject
.
getGlove
in interface IGoalKeeper
public int getTargetGlide()
IGoalKeeperControl
getTargetGlide
in interface IGoalKeeperControl
public void glide(int glideSpeed)
IGoalKeeperControl
glide
in interface IGoalKeeperControl
public void skate(int x, int y, int speed)
skate
in class Player
public void skate(IObject o, int speed)
Player
IObject
with maximum turn speed.
skate
in class Player
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |