|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdata.GameEntity
data.Obstacle
public class Obstacle
| Field Summary | |
|---|---|
private boolean |
type
This boolean variable will let us to determine the type of the Obstacle false = breakable true = unbreakable |
| Fields inherited from class data.GameEntity |
|---|
dx, dy, ge, sm, sprite, x, y |
| Constructor Summary | |
|---|---|
Obstacle(GameEngine ge,
java.lang.String file,
int x,
int y,
ScreenManager sm,
boolean type)
|
|
| Method Summary | |
|---|---|
void |
collidedWith(GameEntity entity)
When a collision between a Sting and obstacle,
obstacle will be destroyed if it is breakable. |
| Methods inherited from class data.GameEntity |
|---|
collidesWith, draw, getX, getY, move |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private boolean type
| Constructor Detail |
|---|
public Obstacle(GameEngine ge,
java.lang.String file,
int x,
int y,
ScreenManager sm,
boolean type)
ge - file - x - y - sm - type - | Method Detail |
|---|
public void collidedWith(GameEntity entity)
Sting and obstacle,
obstacle will be destroyed if it is breakable.
It also stops the chain and rope types of stings, and destroys the
rope type of sting.
collidedWith in class GameEntity
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||