d513d5f9fa
XXXDrawers. ImagePanel.java removed.
35 lines
651 B
Java
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();
|
|
}
|
|
|
|
|
|
}
|