ReplicatorDrawer now handles every Directions.

PlayerBase.draw() is now synchronized.
This commit is contained in:
ericnerdo 2016-05-13 15:05:55 +02:00
parent 6bc50e7810
commit f38c4e5bd6

View File

@ -13,21 +13,20 @@ public class PlayerBaseDrawer extends AbstractDrawer implements Drawer {
@Override
public void draw() throws IOException {
//TODO Pictures for different facing directions.
switch(playerbase.name){
case "Replicator":
switch(playerbase.facingDirection){
case NORTH:
changeImage("Replicator.png");
changeImage("Replicator_Up.png");
break;
case EAST:
changeImage("Replicator_east.png");
changeImage("Replicator_Right.png");
break;
case SOUTH:
changeImage("Replicator.png");
changeImage("Replicator_Down.png");
break;
default:
changeImage("Replicator_west.png");
changeImage("Replicator_Left.png");
break;
}
}