|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectunc.cdva.gameengine.managers.ProblemManager
public class ProblemManager
The problem manager has the task of managing the lifecylce of
problem objects. It creates them, allows access to them, and can
destroy them.
The problem manager is meant to be used by the game engine in
conjunction with the other 'managers.'
The problem manager is a singleton class, and there will always be
either zero or one instances of the problem manager.
Note that the lifecycle of a problem object begins when a player
places a reticle, and ends when the player fires at the placed
reticle.
Method Summary | |
---|---|
void |
addProblem(javax.vecmath.Vector3f ret,
javax.vecmath.Vector3f gun,
Id id)
Creates a problem object. |
static ProblemManager |
getInstance()
Retrieves the instance of the problem manager. |
Problem |
getProblem(Id id)
Retrieves a problem by the id. |
void |
init()
Used to re-initialize the problem manager. |
void |
removeProblem(Id id)
Removes the problem with some id. |
int |
size()
Returns the total number of problem objects that the problem manager is managing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ProblemManager getInstance()
public void removeProblem(Id id)
id
- The id of the problem to be removed.
java.lang.IllegalArgumentException
- if there is no problem with the
id passed in by the problem.public void addProblem(javax.vecmath.Vector3f ret, javax.vecmath.Vector3f gun, Id id)
ret
- A vector3f representing the position of the placed reticle.gun
- A vector3f representing the position of the cannon.id
- The id to mark the problem with.public Problem getProblem(Id id)
id
- The id of a problem to retrieve.
java.lang.IllegalArgumentException
- if there is no problem object
with the given id.public int size()
size
in interface Manager
public void init()
init
in interface Manager
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |