|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmhframework.MHActorList
public class MHActorList
This class keeps a collection of MHActor objects.
Constructor Summary | |
---|---|
MHActorList()
Constructor. |
Method Summary | |
---|---|
void |
add(MHActor actor)
Adds a new actor to the list. |
void |
advance()
Advances all actors in the list. |
void |
advance(int index)
Advances the actor at the given index. |
void |
clear()
Clears the list of actor references. |
MHActor |
get(int index)
Returns the actor at the given index. |
int |
getSize()
Returns the number of actors in the list. |
boolean |
isEmpty()
States whether the actor list is empty. |
MHActor |
remove(int index)
Removes the actor at the given index and returns a reference to it. |
void |
render(java.awt.Graphics2D g)
Renders all actors in the list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MHActorList()
Method Detail |
---|
public void add(MHActor actor)
actor
- The new actor to be added to the list.public MHActor get(int index)
index
- The index of the actor being requested.
public void clear()
public boolean isEmpty()
public MHActor remove(int index)
index
- The index of the actor being removed.
public void advance(int index)
index
- The index of the actor being advanced.public void advance()
advance
in interface MHRenderable
public void render(java.awt.Graphics2D g)
render
in interface MHRenderable
g
- The Graphics2D object on which to render the actor.public int getSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |