Added Shot

Currently you can shoot balls of light, but they dont do anything yet

Signed-off-by: Ricky Barrette <rickbarrette@gmail.com>
This commit is contained in:
2012-04-02 02:19:16 -04:00
parent c54e39b01c
commit 1eaca0998a
7 changed files with 203 additions and 86 deletions

View File

@@ -59,14 +59,17 @@ public class Display extends JPanel {
super.paintComponent(g);
/*
* Draw the world's objects
* Move & Draw the world's objects
*/
for (Object item : mGame.getWorld()) {
if (item instanceof Ship) {
Ship s = (Ship) (item);
s.move(getHeight(), getWidth());
s.draw(g);
}
Object item;
for (int i = 0; i < mGame.getWorld().size(); i++) {
item = mGame.getWorld().get(i);
if (item instanceof MovingSpaceObject)
((MovingSpaceObject) item).move(getHeight(), getWidth());
if(item instanceof Drawable)
((Drawable) item).draw(g);
}
}
}