v0.4.3b: undid respositioning of static scene variable, added safety check for toolbar declaration

This commit is contained in:
Evan Debenham 2016-11-04 02:41:36 -04:00
parent 965d0f04ea
commit fd37d1b776

View File

@ -156,6 +156,8 @@ public class GameScene extends PixelScene {
super.create(); super.create();
Camera.main.zoom( GameMath.gate(minZoom, defaultZoom + ShatteredPixelDungeon.zoom(), maxZoom)); Camera.main.zoom( GameMath.gate(minZoom, defaultZoom + ShatteredPixelDungeon.zoom(), maxZoom));
scene = this;
terrain = new Group(); terrain = new Group();
add( terrain ); add( terrain );
@ -379,7 +381,6 @@ public class GameScene extends PixelScene {
fadeIn(); fadeIn();
} }
scene = this;
} }
public void destroy() { public void destroy() {
@ -807,7 +808,7 @@ public class GameScene extends PixelScene {
public static void ready() { public static void ready() {
selectCell( defaultCellListener ); selectCell( defaultCellListener );
QuickSlotButton.cancel(); QuickSlotButton.cancel();
if (scene != null) scene.toolbar.examining = false; if (scene != null && scene.toolbar != null) scene.toolbar.examining = false;
} }
public static void examineCell( Integer cell ) { public static void examineCell( Integer cell ) {