|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.trinity.cs.gamecore.madison.MadisonScreen
public class MadisonScreen
Field Summary | |
---|---|
static long |
serialVersionUID
|
Constructor Summary | |
---|---|
MadisonScreen()
|
Method Summary | |
---|---|
void |
addEntity(MadisonEntity ge)
Add the specified entity to the list for this screen. |
java.util.Iterator<MadisonEntity> |
createEntityIterator()
Returns an Iterator object that can be used to "walk through" the list of entities on this screen. |
java.awt.Container |
editPropertiesPanel()
This method returns a panel that should be set up so that users can edit the properties of this screen. |
MadisonBlock |
getBlock(int x,
int y)
Returns the block at location x,y. |
MadisonBlock |
getBlockOfType(int type)
Takes a number between 0 and getNumBlockTypes()-1 and returns an instance of a block corresponding to that number. |
MadisonEntity |
getEntityOfType(int type)
Takes a number between 0 and getNumEntityTypes()-1 and returns an instance of an entity corresponding to that number. |
int |
getNumBlockTypes()
Returns the number of different blocks that the screen editor should set up for adding on this type of screen. |
int |
getNumEntityTypes()
Returns the number of different entities that the screen editor should set up for adding on this type of screen. |
java.awt.Dimension |
getSize()
This method returns how many blocks the screen is in width and height. |
void |
removeEntity(MadisonEntity ge)
This method searches for the specified entity in this screen and removes it if found. |
void |
setBlock(int x,
int y,
MadisonBlock b)
Sets the block at location x,y to be b. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long serialVersionUID
Constructor Detail |
---|
public MadisonScreen()
Method Detail |
---|
public MadisonBlock getBlock(int x, int y)
Screen
getBlock
in interface Screen<MadisonBlock,MadisonEntity>
x
- The x location of where you are looking.y
- The y location of where you are looking.
public java.awt.Dimension getSize()
Screen
getSize
in interface Screen<MadisonBlock,MadisonEntity>
Dimension
public java.util.Iterator<MadisonEntity> createEntityIterator()
Screen
createEntityIterator
in interface Screen<MadisonBlock,MadisonEntity>
Iterator
public void addEntity(MadisonEntity ge)
Screen
addEntity
in interface Screen<MadisonBlock,MadisonEntity>
ge
- This is the entity that is to be added to the screen.public void removeEntity(MadisonEntity ge) throws java.util.NoSuchElementException
Screen
removeEntity
in interface Screen<MadisonBlock,MadisonEntity>
ge
- The GameEntity that you want to remove from this screen.
java.util.NoSuchElementException
public int getNumBlockTypes()
Screen
getNumBlockTypes
in interface Screen<MadisonBlock,MadisonEntity>
public void setBlock(int x, int y, MadisonBlock b)
Screen
setBlock
in interface Screen<MadisonBlock,MadisonEntity>
x
- The x location to be set.y
- The y location to be set.b
- The block that you want it to be set to.public MadisonBlock getBlockOfType(int type)
Screen
getBlockOfType
in interface Screen<MadisonBlock,MadisonEntity>
type
- The integer specifying what type to return.
public int getNumEntityTypes()
Screen
getNumEntityTypes
in interface Screen<MadisonBlock,MadisonEntity>
public MadisonEntity getEntityOfType(int type)
Screen
getEntityOfType
in interface Screen<MadisonBlock,MadisonEntity>
type
- The integer specifying what type to return.
public java.awt.Container editPropertiesPanel()
Screen
editPropertiesPanel
in interface Screen<MadisonBlock,MadisonEntity>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |