jeux
Class Player

java.lang.Object
  extended by jeux.Entity
      extended by jeux.Player

public class Player
extends Entity

Author:
jub Le player est une entitée qui écoute les événements clavier.

Field Summary
private  boolean fireOn
          Vrai si le joeur peut-tirer, faux sinon.
private  int fireSpeed
          La vitesse du tir, tout les fireSpeed tours le joueur peut-tirer
private  int vx
          La vitesse horizontale
 
Fields inherited from class jeux.Entity
height, markedForRemoval, speed, spriteName, t, width, world, x, y
 
Constructor Summary
Player(World world)
           
Player(World world, int fireSpeed)
           
 
Method Summary
 void act()
          L'action d'une entité par défaut aucune action
 void fire()
          Si le joeur peut tirer alors un boulet (Bullet) est créé.
 void moveLeft()
           
 void moveRight()
           
 
Methods inherited from class jeux.Entity
getBounds, getHeight, getSpeed, getSpriteName, getWidth, getX, getY, isMarkedForRemoval, setHeight, setMarkedForRemoval, setSpeed, setSpriteName, setWidth, setX, setY
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vx

private int vx
La vitesse horizontale


fireSpeed

private int fireSpeed
La vitesse du tir, tout les fireSpeed tours le joueur peut-tirer


fireOn

private boolean fireOn
Vrai si le joeur peut-tirer, faux sinon.

Constructor Detail

Player

public Player(World world)

Player

public Player(World world,
              int fireSpeed)
Method Detail

act

public void act()
Description copied from class: Entity
L'action d'une entité par défaut aucune action

Overrides:
act in class Entity

fire

public void fire()
Si le joeur peut tirer alors un boulet (Bullet) est créé.


moveLeft

public void moveLeft()

moveRight

public void moveRight()