WallDrawer.java fixed. Looks like asking a null reference's name is not a
good idea.
This commit is contained in:
parent
e63a62893e
commit
f241695413
@ -14,6 +14,9 @@ public class WallDrawer extends ImagePanel implements Drawer {
|
||||
|
||||
@Override
|
||||
public void draw() throws IOException {
|
||||
if(wall.getStargate() == null)
|
||||
changeImage("Wall.png");
|
||||
else{
|
||||
switch(wall.getStargate().getName()){
|
||||
case "Blue Stargate":
|
||||
changeImage("BlueStargate.png");
|
||||
@ -24,16 +27,16 @@ public class WallDrawer extends ImagePanel implements Drawer {
|
||||
case "Red Stargate":
|
||||
changeImage("RedStargate.png");
|
||||
break;
|
||||
case "GreenStargate":
|
||||
case "Green Stargate":
|
||||
changeImage("GreenStargate.png");
|
||||
break;
|
||||
default:
|
||||
changeImage("Wall.png");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
setVisible(true);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user