Friday, July 23, 2010

Asteroid Game in Java 2D Part 3

We need some more interfaces to move our objects. This interface will be used for objects that will need to be moved within the game.

Move.java



public interface Move
{

public void move();
public void Prepare(float e);
public double getPositionX();
public double getPositionZ();
public void rotate();
public double getFuturePosX();
public double getFuturePosZ();

}


The below interface is another class that we will use to move objects.

Movable.java

public interface Moveable
{

public void move(int elapsedMilliSecs);

}


Go To Part 4

0 comments: