cicaprojekt/cicaprojekt/FieldDrawer.java

35 lines
651 B
Java
Raw Normal View History

2016-05-07 12:19:56 +00:00
package cicaprojekt;
import java.io.IOException;
public class FieldDrawer extends AbstractDrawer {
2016-05-07 12:19:56 +00:00
Field field;
public FieldDrawer(Field f) throws IOException {
super("Field.png");
2016-05-07 12:19:56 +00:00
field = f;
}
@Override
2016-05-07 13:47:43 +00:00
public void draw() throws IOException {
if(field.hasBox())
changeImage("Box.png");
else if(field.hasZPM())
changeImage("ZPM.png");
else
changeImage("Field.png");
2016-05-07 12:19:56 +00:00
}
@Override
public int getTileX() {
2016-05-07 12:19:56 +00:00
return field.getX();
}
@Override
public int getTileY() {
2016-05-07 12:19:56 +00:00
return field.getY();
}
2016-05-07 12:19:56 +00:00
}