Class PlayerInfos
java.lang.Object
|
+--DynObject
|
+--PlayerInfos
- All Implemented Interfaces:
- DebugInterface
- Direct Known Subclasses:
- OwnPlayerInfos
- public class PlayerInfos
- extends DynObject
This class is used to represent all co- and opponent players
all atributes of superclass DynObject plus:
- the absolute body-direction of the player
- the absolute head-direction of the player
- the back-number of the player (null means, the number is not viewable)
- Version:
- 1.00
- Author:
- Daniel Förderer and Moritz Steiner
Constructor Summary |
(package private) |
PlayerInfos()
constructor for a PayerInfos object with all its parameters initialized
with 0 or NaN |
(package private) |
PlayerInfos(int time,
java.awt.geom.Point2D.Double position,
java.awt.geom.Point2D.Double formerPosition,
java.awt.geom.Point2D.Double dirVector,
java.awt.geom.Point2D.Double formerDirVector,
double speedChange,
double dirChange,
double dirBody,
double dirHead,
int number)
constructor for a PlayerInfos object that takes all the given parameters |
Method Summary |
double |
getDirBody()
gets the absolute body-direction of the player |
double |
getDirHead()
gets the absolute head-direction of the player |
int |
getNumber()
gets the back-number of the player |
void |
print()
prints the information of the player
usefull for debugging |
void |
setDirBody(double dirBody)
sets the absolute body-direction of the player |
void |
setDirHead(double dirHead)
sets the absolute head-direction of the player |
void |
setNumber(int number)
sets the back-number of the player |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
dirBody
private double dirBody
dirHead
private double dirHead
number
private int number
PlayerInfos
PlayerInfos()
- constructor for a PayerInfos object with all its parameters initialized
with 0 or NaN
PlayerInfos
PlayerInfos(int time,
java.awt.geom.Point2D.Double position,
java.awt.geom.Point2D.Double formerPosition,
java.awt.geom.Point2D.Double dirVector,
java.awt.geom.Point2D.Double formerDirVector,
double speedChange,
double dirChange,
double dirBody,
double dirHead,
int number)
- constructor for a PlayerInfos object that takes all the given parameters
getDirBody
public double getDirBody()
- gets the absolute body-direction of the player
setDirBody
public void setDirBody(double dirBody)
- sets the absolute body-direction of the player
getDirHead
public double getDirHead()
- gets the absolute head-direction of the player
setDirHead
public void setDirHead(double dirHead)
- sets the absolute head-direction of the player
getNumber
public int getNumber()
- gets the back-number of the player
- Returns:
- null means, the number is not viewable
setNumber
public void setNumber(int number)
- sets the back-number of the player
- Parameters:
null
- means, the number is not viewable
print
public void print()
- prints the information of the player
usefull for debugging
- Overrides:
print
in class DynObject