added Food, edited the icons and changed the sprites
@@ -1,15 +1,12 @@
|
||||
package Applicatie;
|
||||
|
||||
import java.awt.BasicStroke;
|
||||
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Point;
|
||||
import java.awt.TexturePaint;
|
||||
import java.awt.geom.AffineTransform;
|
||||
|
||||
import java.awt.geom.GeneralPath;
|
||||
|
||||
import java.awt.geom.NoninvertibleTransformException;
|
||||
import java.awt.geom.Point2D;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
@@ -26,9 +23,9 @@ import Listeners.Mouse;
|
||||
import Listeners.MouseMotion;
|
||||
import Listeners.MouseWheel;
|
||||
import Objects.Entrance;
|
||||
import Objects.Food;
|
||||
import Objects.Path;
|
||||
import Objects.Stage;
|
||||
|
||||
import Objects.Toilet;
|
||||
import Objects.Wall;
|
||||
|
||||
@@ -37,7 +34,7 @@ public class Panel extends JPanel {
|
||||
|
||||
BufferedImage background;
|
||||
BufferedImage podiumImage, toiletImage, entranceImage, pathImage,
|
||||
wallImage;
|
||||
wallImage, foodImage;
|
||||
|
||||
private int panelInfox, panelInfoy, scrollfactor;
|
||||
|
||||
@@ -73,6 +70,7 @@ public class Panel extends JPanel {
|
||||
entranceImage = ImageIO.read(new File("images/entranceIcon.png"));
|
||||
pathImage = ImageIO.read(new File("images/pathIcon.png"));
|
||||
wallImage = ImageIO.read(new File("images/wallIcon.png"));
|
||||
foodImage = ImageIO.read(new File("images/foodIcon.png"));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -81,6 +79,7 @@ public class Panel extends JPanel {
|
||||
panelInfo.add(entranceImage);
|
||||
panelInfo.add(pathImage);
|
||||
panelInfo.add(wallImage);
|
||||
panelInfo.add(foodImage);
|
||||
|
||||
panelInfox = 0;
|
||||
panelInfoy = 0;
|
||||
@@ -118,6 +117,8 @@ public class Panel extends JPanel {
|
||||
return new Path(null);
|
||||
case 4:
|
||||
return new Wall(null);
|
||||
case 5:
|
||||
return new Food(null);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package Objects;
|
||||
import java.awt.geom.Point2D;
|
||||
|
||||
import Applicatie.DrawObject;
|
||||
|
||||
|
||||
public class Food extends DrawObject {
|
||||
|
||||
public Food(Point2D position) {
|
||||
super("images/food.png", position);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return "Food";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import Applicatie.DrawObject;
|
||||
public class Stage extends DrawObject {
|
||||
|
||||
public Stage(Point2D position) {
|
||||
super("images/stage3.png", position);
|
||||
super("images/stage4.png", position);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 5.7 KiB |