cicaprojekt/cicaprojekt/FieldDrawer.java
2016-05-09 16:56:41 +02:00

35 lines
651 B
Java

package cicaprojekt;
import java.io.IOException;
public class FieldDrawer extends AbstractDrawer {
Field field;
public FieldDrawer(Field f) throws IOException {
super("Field.png");
field = f;
}
@Override
public void draw() throws IOException {
if(field.hasBox())
changeImage("Box.png");
else if(field.hasZPM())
changeImage("ZPM.png");
else
changeImage("Field.png");
}
@Override
public int getTileX() {
return field.getX();
}
@Override
public int getTileY() {
return field.getY();
}
}