|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjeux.entities.Entity
public class Entity
Field Summary | |
---|---|
protected int |
height
La hauteur de l'entité |
protected boolean |
markedForRemoval
Vraie si l'entité doit être détruite, faux sinon. |
protected int |
speed
La vitesse de déplacement de l'entité (ne doit pas dépcer la moitié de la taille de la plus petite entité, pour qu'une collision puisse être détectée) |
protected java.lang.String |
spriteName
Le nom du sprite lié à l'entité; |
protected int |
t
Un conteur pour limiter les actions |
protected int |
width
La largeur de l'entité |
protected World |
world
Le monde dans lequel se place l'entité |
protected int |
x
Les coordonnées |
protected int |
y
Les coordonnées |
Constructor Summary | |
---|---|
Entity(World world)
|
Method Summary | |
---|---|
void |
act()
L'action d'une entité par défaut aucune action |
java.awt.Rectangle |
getBounds()
|
int |
getHeight()
|
int |
getSpeed()
|
java.lang.String |
getSpriteName()
|
int |
getWidth()
|
int |
getX()
|
int |
getY()
|
boolean |
isMarkedForRemoval()
|
void |
setHeight(int height)
|
void |
setMarkedForRemoval(boolean markedForRemoval)
|
void |
setSpeed(int speed)
|
void |
setSpriteName(java.lang.String spriteName)
|
void |
setWidth(int width)
|
void |
setX(int x)
|
void |
setY(int y)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int x
protected int y
protected int width
protected int height
protected World world
protected boolean markedForRemoval
protected java.lang.String spriteName
protected int speed
protected int t
Constructor Detail |
---|
public Entity(World world)
world
- Le monde avec lequel l'entité va interagir.Method Detail |
---|
public void act()
public java.awt.Rectangle getBounds()
public int getHeight()
public int getSpeed()
public java.lang.String getSpriteName()
public int getWidth()
public int getX()
public int getY()
public boolean isMarkedForRemoval()
public void setHeight(int height)
height
- définie la hauteurpublic void setMarkedForRemoval(boolean markedForRemoval)
markedForRemoval
- Marque l'entité pour être détruitepublic void setSpeed(int speed)
speed
- défini la vitesse de déplacementpublic void setSpriteName(java.lang.String spriteName)
spriteName
- défini le sprite de l'entitépublic void setWidth(int width)
width
- défini la largeurpublic void setX(int x)
x
- défini l'absicepublic void setY(int y)
y
- défini l'ordonnée
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |