|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--javax.microedition.lcdui.game.Layer
|
+--javax.microedition.lcdui.game.TiledLayer
|
+--Field
Field is a TiledLayer which looks after the lowest layer of the game.
Title: Monkey Madness
Description: Player must run around field, destroying and avoiding bombs, droids and boss!
Copyright: Copyright (c) 2005
Company: Pistachio Monkey
| Method Summary | |
void |
beat()
beat method animates the flames in the corners |
void |
buildField()
builds the tiled layer out of the different game tile arrays |
boolean |
containsStartZone(int x,
int y,
int width,
int height)
sees if the field is a startzone tile (blue) |
int |
getBossStartX()
returns a start X position for the boss |
int |
getBossStartY()
returns a start Y position for the boss |
int |
getFieldCell(int row,
int column)
gets the cell value for the loaction |
int |
getPlayerStartX(int i)
returns start X postion for a player |
int |
getPlayerStartY(int i)
returns start Y postion for a player |
int |
getStartOffset()
returns an offset start position, used for removing the boss instance frokm the gaming field |
boolean |
inZone(int x,
int y,
int width,
int height)
returns true if every pixel of the sprite is in the zone square |
int[] |
locatorDefined(int x,
int y,
int width,
int height)
defines a single cell to be location of the sprite |
int[] |
locatorVaried(int x,
int y,
int width,
int height,
int blend)
retruns an array of the possible field postions the sprite could be within |
boolean |
noGo(int x,
int y,
int width,
int height)
returns true if the player hits a wall! |
| Methods inherited from class javax.microedition.lcdui.game.TiledLayer |
createAnimatedTile, fillCells, getAnimatedTile, getCell, getCellHeight, getCellWidth, getColumns, getRows, paint, setAnimatedTile, setCell, setStaticTileSet |
| Methods inherited from class javax.microedition.lcdui.game.Layer |
getHeight, getWidth, getX, getY, isVisible, move, setPosition, setVisible |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public void buildField()
public int getPlayerStartX(int i)
i - the position value for the player number
public int getPlayerStartY(int i)
i - the position value for the player number
public int getBossStartX()
public int getBossStartY()
public int getStartOffset()
public void beat()
public boolean noGo(int x,
int y,
int width,
int height)
x - x positiony - y positionwidth - width of the spriteheight - height of the sprite
public boolean inZone(int x,
int y,
int width,
int height)
x - x positiony - y positionwidth - width of the spriteheight - height of the sprite
public int[] locatorVaried(int x,
int y,
int width,
int height,
int blend)
x - x positiony - y positionwidth - width of the spriteheight - height of the spriteblend - used to add futher variation to the loaction
public int[] locatorDefined(int x,
int y,
int width,
int height)
x - x positiony - y positionwidth - width of the player spriteheight - height of the player sprite
public boolean containsStartZone(int x,
int y,
int width,
int height)
x - x positiony - y positionwidth - width of the player spriteheight - height of the player sprite
public int getFieldCell(int row,
int column)
row - numbercolumn - number
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||