|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectspaceinvaders.InvaderFactory
public class InvaderFactory
Static class - its methods are used to generate instances of classes that implement the Invader interface.
| Constructor Summary | |
|---|---|
InvaderFactory()
|
|
| Method Summary | |
|---|---|
static SpaceInvader |
defaultInvader(Game g)
Used in the inital game setup, returns instances of whatever is the "default" invader. |
static SpaceInvader |
newInvader(Game g)
Returns an invader of some randomly chosen specialized type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InvaderFactory()
| Method Detail |
|---|
public static SpaceInvader defaultInvader(Game g)
g - Reference to the Game object - passed to Invaders in their constructors (it gets
used to do some operations on (x,y) coordinates.
public static SpaceInvader newInvader(Game g)
g - Reference to the Game object, passed to invaders in their constructors
and used for some operations involving (x,y) coordinates.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||