|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimogl.gameobjects.AbstractGameObject
public abstract class AbstractGameObject
This class is the basic model of any other game object
Constructor Summary | |
---|---|
AbstractGameObject(float x,
float y,
float z)
Creates a new game object |
Method Summary | |
---|---|
AbstractMD2Model |
getModel()
Returns the md2 model of the character |
java.lang.String |
getName()
Returns the name of the game object |
Point3D |
getPosition()
Returns the position of the gane object as a Point3D object |
float |
getX()
Returns the x-position of the game object |
float |
getY()
Returns the y-position of the game object |
float |
getZ()
Returns the z-position of the game object |
void |
setPosition(float x,
float y,
float z)
Sets the position of the game object to the specified parameters |
void |
setPosition(Point3D position)
Sets the position of the game object |
void |
setX(float x)
Sets the x-coordinate of the game object |
void |
setY(float y)
Sets the y-coordinate of the game object |
void |
setZ(float z)
Sets the z-coordinate of the game object |
abstract void |
update(long elapsedTime)
Updates a game object |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractGameObject(float x, float y, float z)
x
- x-coordinatey
- y-coordinatez
- z-coordinateMethod Detail |
---|
public AbstractMD2Model getModel()
public Point3D getPosition()
public void setPosition(Point3D position)
position
- position to set the game object topublic void setPosition(float x, float y, float z)
x
- x-coordinatey
- y-coordinatez
- z-coordinatepublic void setX(float x)
x
- x-coordinatepublic void setY(float y)
y
- y-coordinatepublic void setZ(float z)
z
- z-coordinatepublic float getX()
public float getY()
public float getZ()
public java.lang.String getName()
public abstract void update(long elapsedTime)
elapsedTime
- time between two frames
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |