2016-05-07 12:19:56 +00:00
|
|
|
package cicaprojekt;
|
|
|
|
|
2016-05-07 12:40:52 +00:00
|
|
|
import java.io.IOException;
|
|
|
|
|
2016-05-09 14:52:04 +00:00
|
|
|
public class FieldDrawer extends AbstractDrawer {
|
2016-05-07 12:19:56 +00:00
|
|
|
Field field;
|
|
|
|
|
2016-05-07 12:40:52 +00:00
|
|
|
public FieldDrawer(Field f) throws IOException {
|
2016-05-07 18:12:49 +00:00
|
|
|
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
|
2016-05-09 14:52:04 +00:00
|
|
|
changeImage("Field.png");
|
2016-05-07 12:19:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2016-05-07 18:15:08 +00:00
|
|
|
public int getTileX() {
|
2016-05-07 12:19:56 +00:00
|
|
|
return field.getX();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2016-05-07 18:15:08 +00:00
|
|
|
public int getTileY() {
|
2016-05-07 12:19:56 +00:00
|
|
|
return field.getY();
|
|
|
|
}
|
|
|
|
|
2016-05-09 14:52:04 +00:00
|
|
|
|
2016-05-07 12:19:56 +00:00
|
|
|
}
|