v0.3.4: added the ability for windows to persist between scene resets
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user