v0.3.4: added the ability for windows to persist between scene resets

This commit is contained in:
Evan Debenham
2016-02-03 16:10:22 -05:00
parent 5d4d0bf138
commit d1c70f038b
6 changed files with 126 additions and 70 deletions
@@ -52,6 +52,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.features.Chasm;
import com.shatteredpixel.shatteredpixeldungeon.levels.traps.Trap;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant;
import com.shatteredpixel.shatteredpixeldungeon.services.Services;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.DiscardedItemSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.HeroSprite;
@@ -336,6 +337,15 @@ public class GameScene extends PixelScene {
Camera.main.target = hero;
if (windowOnCreate != null){
try{
add(windowOnCreate.newInstance());
} catch (Exception e){
ShatteredPixelDungeon.reportException(e);
}
windowOnCreate = null;
}
if (InterlevelScene.mode != InterlevelScene.Mode.NONE) {
if (Dungeon.depth < Statistics.deepestFloor) {
GLog.h(Messages.get(this, "welcome_back"), Dungeon.depth);