Class Bomb

java.lang.Object
  |
  +--javax.microedition.lcdui.game.Layer
        |
        +--javax.microedition.lcdui.game.TiledLayer
              |
              +--Bomb

public class Bomb
extends javax.microedition.lcdui.game.TiledLayer

handles matters of the bomb, flames red brick walls

Title: Monkey Madness

Description: Player must run around field, destroying and avoiding bombs, droids and boss!

Copyright: Copyright (c) 2005

Company: Pistachio Monkey


Nested Class Summary
 class Bomb.Explode
          inner class of the Bomb, handels the explosions Title: Monkey Madness Description: Player must run around field, destroying and avoiding bombs, droids and boss!
 
Field Summary
static int beatBomb
           
static int beatBombCtr
           
static int bombDelay
           
 int east
           
 int north
           
 int south
           
 int west
           
 
Method Summary
 void beat()
          keeps the animation alive
 void bombFlush()
          empties the array to null and replaces level buffers
 void change(int row, int column, int value)
          calls to change the value of a cell
 void cleanFire()
          loctaes any tiles of fire or bombs and removes them
 void createBombMap()
          randomly generates positions for walls
 void drop(int column, int row, int flameLength)
          calls that a drop has been made and where it is we start a new thread called explThread to now take care of the explosion
 void dropBomb(int x, int y, int width, int height, int flameLength)
          drops a bomb
 int getBombCell(int row, int column)
          retrieves the value of a cell
 int identifyBombLayer(int x, int y, int width, int height)
          identifys what value the bomb layer is
 void setBombLayer()
          sets the array to become a tile array
 void vibrateAndBombUp(int msec)
          calls the vibrate, and also replenishes the players ammo
 
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
 

Field Detail

north

public int north

south

public int south

east

public int east

west

public int west

beatBomb

public static int beatBomb

beatBombCtr

public static int beatBombCtr

bombDelay

public static int bombDelay
Method Detail

createBombMap

public void createBombMap()
randomly generates positions for walls


setBombLayer

public void setBombLayer()
sets the array to become a tile array


bombFlush

public void bombFlush()
empties the array to null and replaces level buffers


cleanFire

public void cleanFire()
loctaes any tiles of fire or bombs and removes them


beat

public void beat()
keeps the animation alive


dropBomb

public void dropBomb(int x,
                     int y,
                     int width,
                     int height,
                     int flameLength)
drops a bomb

Parameters:
x - x position
y - y position
width - width of the player sprite
height - height of the player sprite
flameLength - number of tiles for which the fire will spread

drop

public void drop(int column,
                 int row,
                 int flameLength)
calls that a drop has been made and where it is we start a new thread called explThread to now take care of the explosion

Parameters:
column - of the bomb
row - of the bomb
flameLength - number of tiles the flames will travel

vibrateAndBombUp

public void vibrateAndBombUp(int msec)
calls the vibrate, and also replenishes the players ammo

Parameters:
msec - time period for vibration

change

public void change(int row,
                   int column,
                   int value)
calls to change the value of a cell

Parameters:
row - loaction
column - location
value - the new value for the cell

getBombCell

public int getBombCell(int row,
                       int column)
retrieves the value of a cell

Parameters:
row - location
column - location
Returns:
cell number

identifyBombLayer

public int identifyBombLayer(int x,
                             int y,
                             int width,
                             int height)
identifys what value the bomb layer is

Parameters:
x - x position
y - y position
width - width of the player sprite
height - height of the player sprite
Returns:
int bomb vlaue