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 @Override
public void draw() throws IOException { public void draw() throws IOException {
//TODO Pictures for different facing directions.
switch(playerbase.name){ switch(playerbase.name){
case "Replicator": case "Replicator":
switch(playerbase.facingDirection){ switch(playerbase.facingDirection){
case NORTH: case NORTH:
changeImage("Replicator.png"); changeImage("Replicator_Up.png");
break; break;
case EAST: case EAST:
changeImage("Replicator_east.png"); changeImage("Replicator_Right.png");
break; break;
case SOUTH: case SOUTH:
changeImage("Replicator.png"); changeImage("Replicator_Down.png");
break; break;
default: default:
changeImage("Replicator_west.png"); changeImage("Replicator_Left.png");
break; break;
} }
} }