GateDrawer now handles open-close properly

Meow.
This commit is contained in:
ericnerdo 2016-05-13 15:17:39 +02:00
parent e64e18233c
commit cc73a671f5

View File

@ -6,16 +6,16 @@ public class GateDrawer extends AbstractDrawer {
Gate gate; Gate gate;
public GateDrawer(Gate g) throws IOException { public GateDrawer(Gate g) throws IOException {
super("ClosedGate.png"); super("Gate.png");
gate = g; gate = g;
} }
@Override @Override
public void draw() throws IOException { public void draw() throws IOException {
if(gate.isOpen()) if(gate.isOpen())
changeImage("Field.png"); //TODO picture for open gate. changeImage("OpenGate.png");
else else
changeImage("ClosedGate.png"); changeImage("Gate.png");
} }
@Override @Override