so these happened

screensaver
marcus13345 2015-03-21 22:11:22 -04:00
parent 24a2056c34
commit b30711e2cf
6 changed files with 8 additions and 33 deletions

View File

@ -123,10 +123,9 @@ public class SpaceWars implements BasicApp {
@Override
public void initialize() {
try {
background = ImageIO.read(new URL("http://wallpaperswiki.org/wallpapers/2012/11/Wallpaper-Abstract-Wallpaper-Background-Texture-Texture-Yellow-Pictures-600x1024.jpg"));
background = ImageIO.read(new URL("http://wallpaperswiki.org/2012/11/Wallpaper-Abstract-Wallpaper-Background-Texture-Texture-Yellow-Pictures-600x1024.jpg"));
entities.add(player);
entities.add(new NormalEnemy(0, 0));
entities.add(new NormalEnemy(0, 0));
for (int i = 0; i < 100; i++)
entities.add(new NormalEnemy(0, 0));
} catch (Exception e) {
background = (Image) new BufferedImage(1024, 600, BufferedImage.TRANSLUCENT);

View File

@ -51,10 +51,6 @@ public abstract class Enemy extends Entity {
public abstract boolean getAlive();
public abstract Color getColor();
public int getWorth() {
return 1;
}
public abstract void damage(int damage);
public abstract boolean isCollidable();

View File

@ -171,11 +171,6 @@ public class BlueEnemy extends Enemy {
return color;
}
@Override
public int getWorth(){
return r.nextInt(3)+1;
}
public boolean isCollidable() {
return true;
}

View File

@ -178,11 +178,6 @@ public class GreenEnemy extends Enemy {
return color;
}
@Override
public int getWorth() {
return r.nextInt(3) + 1;
}
public boolean isCollidable() {
return true;
}

View File

@ -172,11 +172,6 @@ public class NormalEnemy extends Enemy {
return color;
}
@Override
public int getWorth() {
return r.nextInt(3) + 1;
}
public boolean isCollidable() {
return true;
}

View File

@ -168,11 +168,6 @@ public class RedEnemy extends Enemy {
return color;
}
@Override
public int getWorth(){
return (int)(Math.random() * 3)+1;
}
@Override
public boolean isCollidable() {
return true;