|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface to player control.
Also provides information about the player that is not available to other players, and game queries to retreive the puck, goal-keepers and other players.
Field Summary | |
static int |
ACCELERATION
Player acceleration, in cm/s^2 |
static int |
MAX_SHOT_SPEED
Maximum absolute shot speed, in cm/s |
static int |
MAX_SPEED
Maximum player speed, in cm/s |
static int |
MAX_STICK_ANGLE
Maximum stick relative angle from player's heading, in degrees. |
static int |
MAX_STICK_R
Maximum stick distance from player's centre, in cm. |
static int |
MAX_TURN_SPEED
Maximum turn speed, in degrees/s |
static int |
MIN_STICK_ANGLE
Minimum stick relative angle from player's heading, in degrees. |
static int |
MIN_STICK_R
Minimum stick distance from player's centre, in cm. |
Method Summary | |
boolean |
getAimOnStick()
The aimOnStick property controls whether the endpoint of the stick or the body position should used when moving to a target position. |
IGoalKeeper |
getGoalKeeper(int index)
Gets a goal-keeper from the game. |
IPlayer |
getPlayer(int index)
Gets a player from the game. |
IPuck |
getPuck()
Gets the puck from the game. |
int |
getScore(boolean myScore)
Gets the current score of one of the teams. |
int |
getTargetHeading()
Returns the target heading, in degrees. |
int |
getTargetSpeed()
Returns the target speed, in cm/s. |
int |
getTargetStickAngle()
Returns the target stick relative angle from player's heading, in degrees. |
int |
getTargetStickR()
Returns the target stick distance from player's centre, in degrees. |
int |
getTurnSpeed()
Returns the turn speed, in degrees/s. |
void |
moveStick(int angle,
int radius)
Move the stick to a given angle and distance relative to the player. |
void |
setAimOnStick(boolean aos)
The aimOnStick property controls whether the endpoint of the stick or the body position should used when moving to a target position. |
void |
setDebugPoint(int x,
int y,
java.awt.Color c)
Sets a point displayed in the HDE. |
void |
setMessage(java.lang.String message)
Sets the message displayed in the HDE. |
void |
shoot(int heading,
int speed)
Shoot the puck in a given absolute heading and speed. |
void |
showDebugPoint(boolean show)
Sets whether the debug point should be shown. |
void |
skate(int speed)
Accelerate to a given speed. |
void |
turn(int heading,
int turnSpeed)
Turn towards a given angle with a given turn speed. |
Field Detail |
public static final int ACCELERATION
public static final int MAX_SPEED
public static final int MAX_TURN_SPEED
public static final int MIN_STICK_R
public static final int MAX_STICK_R
public static final int MIN_STICK_ANGLE
public static final int MAX_STICK_ANGLE
public static final int MAX_SHOT_SPEED
Method Detail |
public boolean getAimOnStick()
public int getTargetSpeed()
public int getTargetHeading()
public int getTurnSpeed()
public int getTargetStickAngle()
public int getTargetStickR()
public void setAimOnStick(boolean aos)
public void skate(int speed)
public void turn(int heading, int turnSpeed)
public void moveStick(int angle, int radius)
public void shoot(int heading, int speed)
public int getScore(boolean myScore)
myScore
- whether you want your own score or your
opponent's score.public IPuck getPuck()
public IGoalKeeper getGoalKeeper(int index)
index
- the index of the goal-keeper:
public IPlayer getPlayer(int index)
index
- the index of the player. The indices are:
public void setMessage(java.lang.String message)
System.out
.
message
- the message.public void setDebugPoint(int x, int y, java.awt.Color c)
public void showDebugPoint(boolean show)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |