|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfeud.testgame.model.LocalObject
The base class for any kind of object in the game world. A LocalObject can exist on the server as well as on the client. It contains everything needed to describe an object but doesn't represent the actual (3D-) view of it.
Constructor Summary | |
LocalObject()
Create a new local object. |
|
LocalObject(int clientID)
Create a new local object for that client. |
Method Summary | |
void |
addToValue(int val)
Add a number to the objects value. |
void |
copyFrom(LocalObject src)
Copies the data from another local object to this one. |
boolean |
equals(java.lang.Object obj)
|
int |
getAnimation()
Returns the animation. |
int |
getAnimationSpeed()
Returns the speed of the animation. |
int |
getClientID()
Returns the client ID of this object. |
int |
getObjectID()
Gets the object ID. |
com.threed.jpct.SimpleVector |
getPosition()
Returns the current positoin of the object. |
com.threed.jpct.Matrix |
getRotation()
Returns the current rotation matrix. |
com.threed.jpct.SimpleVector |
getSpeed()
Returns a vector indicating the direction/speed of this object's current movement. |
int |
getType()
Gets the type. |
int |
getValue()
Returns the value of this object. |
ClientObject |
getView()
Returns the view object. |
boolean |
hasCollided()
Returns if this object has collided with another one. |
int |
hashCode()
|
void |
setAnimation(int anim)
Sets the animation. |
void |
setAnimationSpeed(int speed)
Sets the speed of the animation. |
void |
setCollided(boolean has)
Set a flag that this object was part of a collision (like when a bullet hits a target). |
void |
setObjectID(int oid)
Sets the object id. |
void |
setPosition(com.threed.jpct.SimpleVector pos)
Sets the current position of the object. |
void |
setRotation(com.threed.jpct.Matrix mat)
Sets the current rotation for this object, i.e. its direction. |
void |
setSpeed(com.threed.jpct.SimpleVector spd)
Sets the "speed" of the object, i.e. the direction and speed in which it's moving. |
void |
setType(int type)
Sets the type of this object. |
void |
setValue(int val)
Sets the objects value. |
void |
setView(ClientObject obj)
Sets the view for this local object. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LocalObject()
public LocalObject(int clientID)
clientID
- the unique ID of that client to which this object belongsMethod Detail |
public void addToValue(int val)
val
- the value that has to be addedpublic int getValue()
public void setValue(int val)
val
- the valuepublic void setCollided(boolean has)
has
- collided?public boolean hasCollided()
public void copyFrom(LocalObject src)
src
- the source objectpublic void setView(ClientObject obj)
obj
- the view objectpublic ClientObject getView()
public void setAnimation(int anim)
anim
- the animationpublic int getAnimation()
public void setAnimationSpeed(int speed)
speed
- the speedpublic int getAnimationSpeed()
public void setType(int type)
type
- the typepublic int getType()
public int getClientID()
public void setObjectID(int oid)
oid
- the object IDpublic int getObjectID()
public void setPosition(com.threed.jpct.SimpleVector pos)
pos
- the positionpublic com.threed.jpct.SimpleVector getPosition()
public void setRotation(com.threed.jpct.Matrix mat)
mat
- the rotation matrixpublic com.threed.jpct.Matrix getRotation()
public void setSpeed(com.threed.jpct.SimpleVector spd)
spd
- the speedpublic com.threed.jpct.SimpleVector getSpeed()
public boolean equals(java.lang.Object obj)
public int hashCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |