de.rico.adventure.actions.custom.concurrent
Class AbstractConcurrentAction

java.lang.Object
  extended by de.rico.adventure.actions.custom.concurrent.AbstractConcurrentAction
Direct Known Subclasses:
ConcurrentWalk, ConcurrentWalkLoop

public abstract class AbstractConcurrentAction
extends java.lang.Object

This class is the abstract base class for any kind of concurrent game action.

Author:
Frank Bruns

Constructor Summary
AbstractConcurrentAction()
          Creates a new concurrent game action without a specified entity.
AbstractConcurrentAction(AbstractEntity e)
          Creates a new concurrent game action for the specified entity.
 
Method Summary
abstract  void draw(javax.media.opengl.GL gl)
          This method renders the concurrent game action, if needed.
abstract  void finishUp()
          Implementations of this method hold code that needs to be called before the game action can be removed from the concurrent queue (prematurely) without causing side effects.
 AbstractEntity getEntity()
          Returns the entity of the concurrent game action, if it has one, else null.
abstract  void update(long elapsedTime)
          This method updates the concurrent game action
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractConcurrentAction

public AbstractConcurrentAction()
Creates a new concurrent game action without a specified entity.


AbstractConcurrentAction

public AbstractConcurrentAction(AbstractEntity e)
Creates a new concurrent game action for the specified entity.

Parameters:
e - entity for this game action
Method Detail

getEntity

public AbstractEntity getEntity()
Returns the entity of the concurrent game action, if it has one, else null.

Returns:
entity of the game action, or null

finishUp

public abstract void finishUp()
Implementations of this method hold code that needs to be called before the game action can be removed from the concurrent queue (prematurely) without causing side effects.


update

public abstract void update(long elapsedTime)
This method updates the concurrent game action

Parameters:
elapsedTime - time between two frames

draw

public abstract void draw(javax.media.opengl.GL gl)
This method renders the concurrent game action, if needed.

Parameters:
gl -