|
|
@@ -3,6 +3,7 @@ package gui.simulator.facilities;
|
|
|
import java.awt.Color;
|
|
|
import java.awt.Graphics2D;
|
|
|
import java.awt.geom.GeneralPath;
|
|
|
+import java.awt.geom.Rectangle2D;
|
|
|
import java.io.Serializable;
|
|
|
import java.util.GregorianCalendar;
|
|
|
|
|
|
@@ -21,16 +22,33 @@ public class SimulatorStage extends DrawEngine implements Serializable {
|
|
|
private Act playingact;
|
|
|
private int movement1,movement2;
|
|
|
private long lastTime;
|
|
|
+ private boolean drawWalkArea;
|
|
|
+ private Rectangle2D.Double walkArea = new Rectangle2D.Double(20, 250, 350, 100);
|
|
|
|
|
|
- public SimulatorStage(int x, int y, Terrain terrain) {
|
|
|
+ public SimulatorStage(int x, int y, Terrain terrain, boolean drawWalkArea) {
|
|
|
super(images, x, y, 1, 0,SimulatorPane.Objects.STAGE, terrain);
|
|
|
changeLightbeam();
|
|
|
+ this.drawWalkArea = drawWalkArea;
|
|
|
}
|
|
|
|
|
|
- public SimulatorStage(int x, int y, double scale, double distance, Terrain terrain) {
|
|
|
- super(images, x, y, scale, distance,SimulatorPane.Objects.STAGE, terrain);
|
|
|
+ public SimulatorStage(int x, int y, double scale, double distance, Terrain terrain, boolean drawWalkArea) {
|
|
|
+ super(images, x, y, scale, distance, SimulatorPane.Objects.STAGE, terrain);
|
|
|
+ this.drawWalkArea = drawWalkArea;
|
|
|
changeLightbeam();
|
|
|
}
|
|
|
+
|
|
|
+ public SimulatorStage(int x, int y, double scale, double distance, Terrain terrain) {
|
|
|
+ super(images, x, y, scale, distance, SimulatorPane.Objects.STAGE, terrain);
|
|
|
+ this.drawWalkArea = false;
|
|
|
+ changeLightbeam();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public SimulatorStage(int x, int y, Terrain terrain) {
|
|
|
+ super(images, x, y, 1, 0,SimulatorPane.Objects.STAGE, terrain);
|
|
|
+ changeLightbeam();
|
|
|
+ this.drawWalkArea = false;
|
|
|
+ }
|
|
|
|
|
|
public String getFacilityName(){
|
|
|
return facilityName;
|
|
|
@@ -72,7 +90,12 @@ public class SimulatorStage extends DrawEngine implements Serializable {
|
|
|
g.fill(this.getAffineTransform().createTransformedShape(lightbeam));
|
|
|
}
|
|
|
super.draw(g);
|
|
|
+ if(this.drawWalkArea){
|
|
|
+ g.setColor(Color.GREEN);
|
|
|
+ g.fill(getAffineTransform().createTransformedShape(this.walkArea));
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
public void changeLightbeam(){
|
|
|
lastTime = System.currentTimeMillis();
|
|
|
movement1 = (int) (Math.random()*70)-35;
|