|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjeux.World
public class World
Field Summary | |
---|---|
private java.util.Vector<Entity> |
entities
La collection des entités qui peuplent le monde. |
private int |
height
La hauteur du jeux |
private MusicCache |
musicCache
Le gestionnaire de music |
private java.lang.String |
name
Le nom du monde |
private Player |
player
Le player |
private SoundCache |
soundCache
Le gestionnaire de son |
private SpriteCache |
spriteCache
Le gestionnaire de sprite |
private int |
width
La largeur du jeux |
Constructor Summary | |
---|---|
World()
Construit un monde en 800 par 600 |
|
World(int width,
int height)
|
Method Summary | |
---|---|
void |
actAll()
Anime le monde |
void |
addEntity(Entity entity)
|
void |
checkCollision()
Permet de tester les collision et de marquer les entités pour destruction. |
void |
clean()
Permet de retirer du monde, les entités marquées pour destruction |
java.util.Vector<Entity> |
getEntities()
|
int |
getHeight()
|
MusicCache |
getMusicCache()
|
java.lang.String |
getName()
|
Player |
getPlayer()
|
SoundCache |
getSoundCache()
|
SpriteCache |
getSpriteCache()
|
int |
getWidth()
|
boolean |
hasMonster()
|
boolean |
hasPlayer()
|
void |
removeEntity(Entity entity)
|
void |
setEntities(java.util.Vector<Entity> entities)
|
void |
setHeight(int height)
|
void |
setPlayer(Player player)
|
void |
setWidth(int width)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int width
private int height
private java.util.Vector<Entity> entities
private Player player
private SpriteCache spriteCache
private SoundCache soundCache
private MusicCache musicCache
private java.lang.String name
Constructor Detail |
---|
public World()
public World(int width, int height)
width
- la largeurheight
- la hauteur Method Detail |
---|
public void actAll()
public void addEntity(Entity entity)
entity
- la nouvelle entitépublic void checkCollision()
public void clean()
public java.util.Vector<Entity> getEntities()
public int getHeight()
public MusicCache getMusicCache()
public java.lang.String getName()
public Player getPlayer()
public SoundCache getSoundCache()
public SpriteCache getSpriteCache()
public int getWidth()
public boolean hasMonster()
public boolean hasPlayer()
public void removeEntity(Entity entity)
entity
- l'entité qui quitte le monde public void setEntities(java.util.Vector<Entity> entities)
entities
- les entités qui peuleront le mondepublic void setHeight(int height)
height
- La hauteur à positionner.public void setPlayer(Player player)
public void setWidth(int width)
width
- La largueur à positionner.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |