|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--Bomb
classe che implementa le bombe all'interno del gioco gestendo automaticamente il BombCount
| Field Summary | |
protected boolean |
m_bExploding
true se sta esplodendo |
(package private) JBombGame |
m_jbGame
Gioco JBombGame a cui appartiene la bomba |
protected int |
m_nDrawnStep
Ultimo frame disegnato |
protected int |
m_nFireLenght
lunghezza della fiamma |
protected int |
m_nTicks
il numero di timeTick rimasti |
protected int |
m_nX
Coordinata x [in celle] della bomba |
protected int |
m_nY
Coordinata y [in celle] della bomba |
protected static int |
STDBOMBSPRITESTEP
(costante) coordinate dello sprite nel file sprites.gif |
protected static int |
STDBOMBSPRITEX
(costante) coordinate dello sprite nel file sprites.gif |
protected static int |
STDBOMBSPRITEY
(costante) coordinate dello sprite nel file sprites.gif |
protected static int |
TICKSTOEXPLOSION
(costante) il numero di timeTick prima dell'esplosione |
| Constructor Summary | |
protected |
Bomb(JBombGame Game,
int x,
int y,
int firelen,
JBombGrassCell cell)
Costruisce una nuova bomba |
| Method Summary | |
boolean |
BlocksFire()
funzione per sapere se questo oggetto blocca il fuoco o no. |
static Bomb |
dropBomb(JBombGame Game,
int x,
int y,
int firelen)
Crea se possibile una nuova bomba |
void |
Explode(Explodable[][] World)
Funzione per far esplodere la bomba. |
boolean |
IsExploding()
funzione che restituisce se l'oggetto è già in fase di esplosione (rimane anche a esplosione finita). |
void |
paint(java.awt.Graphics g)
Ridisegna la bomba |
void |
timeTick()
Decrementa il contatore di tick della bomba |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
protected int m_nX
protected int m_nY
protected static final int TICKSTOEXPLOSION
protected int m_nTicks
protected boolean m_bExploding
protected int m_nFireLenght
protected static final int STDBOMBSPRITEX
protected static final int STDBOMBSPRITEY
protected static final int STDBOMBSPRITESTEP
protected int m_nDrawnStep
JBombGame m_jbGame
| Constructor Detail |
protected Bomb(JBombGame Game,
int x,
int y,
int firelen,
JBombGrassCell cell)
Game - Il gioco a cui appartienex - La coordinata x della bombay - La coordinata y della bombafirelen - La lunghezza della fiammata generata dalla bombacell - La JBombGrassCell che contiene questa bomba| Method Detail |
public static Bomb dropBomb(JBombGame Game,
int x,
int y,
int firelen)
Game - Il gioco a cui appartienex - La coordinata x della bombay - La coordinata y della bombafirelen - La lunghezza della fiammata generata dalla bombapublic boolean IsExploding()
public boolean BlocksFire()
public void Explode(Explodable[][] World)
World - un array di oggetti Explodablepublic void paint(java.awt.Graphics g)
public void timeTick()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||