feud.testgame.model
Class LocalBullet

java.lang.Object
  extended byfeud.testgame.model.LocalObject
      extended byfeud.testgame.model.LocalBullet

public class LocalBullet
extends LocalObject

An extended local object that represents a bullet.


Field Summary
static long LIFE_TIME
           
 
Constructor Summary
LocalBullet()
          Create a new bullet.
 
Method Summary
 boolean isOld()
          The bullet is old, i.e. it has reached the end of it lifecycle.
 void move(long ticks)
          Move the bullet.
 
Methods inherited from class feud.testgame.model.LocalObject
addToValue, copyFrom, equals, getAnimation, getAnimationSpeed, getClientID, getObjectID, getPosition, getRotation, getSpeed, getType, getValue, getView, hasCollided, hashCode, setAnimation, setAnimationSpeed, setCollided, setObjectID, setPosition, setRotation, setSpeed, setType, setValue, setView
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LIFE_TIME

public static final long LIFE_TIME
See Also:
Constant Field Values
Constructor Detail

LocalBullet

public LocalBullet()
Create a new bullet. A bullet is initially created on a client but for bullets, that doesn't matter as they are short lived entities without "history". Therefore, there's no clientID in the constructor.

Method Detail

move

public void move(long ticks)
Move the bullet.

Parameters:
ticks - number of "ticks" in game time that have passed since the last movement.

isOld

public boolean isOld()
The bullet is old, i.e. it has reached the end of it lifecycle.

Returns:
boolean is it old?