com.developpez.java.spaceinvader.bean
Class Ship

java.lang.Object
  extended by com.developpez.java.spaceinvader.bean.Ship

public class Ship
extends java.lang.Object

Vaisseau spatial


Constructor Summary
Ship(javax.microedition.lcdui.Canvas canvas, int x, int y)
           
 
Method Summary
 javax.microedition.lcdui.Image getImage()
           
 int getX()
           
 int getY()
           
 void moveLeft(int step)
          Déplacement du vaisseau vers la gauche
 void moveRight(int step)
          Déplacement de vaisseau vers la droite
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ship

public Ship(javax.microedition.lcdui.Canvas canvas,
            int x,
            int y)
Method Detail

getX

public int getX()
Returns:
Position en abscice

getY

public int getY()
Returns:
Position en ordonnée

moveLeft

public void moveLeft(int step)
Déplacement du vaisseau vers la gauche

Parameters:
step - Vitesse de déplacement

moveRight

public void moveRight(int step)
Déplacement de vaisseau vers la droite

Parameters:
step - Vitesse de déplacement

getImage

public javax.microedition.lcdui.Image getImage()
Returns:
Image du vaisseau