35 lines
693 B
Java
35 lines
693 B
Java
package cicaprojekt;
|
|
|
|
import java.io.IOException;
|
|
|
|
public class ScaleDrawer extends AbstractDrawer implements Drawer {
|
|
private Scale scale;
|
|
|
|
public ScaleDrawer(Scale s) throws IOException {
|
|
super("Scale.png");
|
|
scale = s;
|
|
}
|
|
|
|
@Override
|
|
public void draw() throws IOException {
|
|
if(scale.hasBox())
|
|
changeImage("Scale_Box.png");
|
|
else
|
|
changeImage("Scale.png");
|
|
}
|
|
|
|
@Override
|
|
public int getTileX() {
|
|
return scale.getX();
|
|
}
|
|
|
|
@Override
|
|
public int getTileY() {
|
|
return scale.getY();
|
|
}
|
|
|
|
public void setScale(Scale scale) {
|
|
this.scale = scale;
|
|
}
|
|
}
|