@Override protected void onCast(final Hero hero) { if (returnDepth == -1){ setBeacon(hero); } else { GameScene.show(new WndOptions(Messages.titleCase(name()), Messages.get(BeaconOfReturning.class, "wnd_body"), Messages.get(BeaconOfReturning.class, "wnd_set"), Messages.get(BeaconOfReturning.class, "wnd_return")){ @Override protected void onSelect(int index) { if (index == 0){ setBeacon(hero); } else if (index == 1){ returnBeacon(hero); } } }); } }
private void setBeacon(Hero hero ){ returnDepth = Dungeon.depth; returnPos = hero.pos; hero.spend( 1f ); hero.busy(); GLog.i( Messages.get(this, "set") ); hero.sprite.operate( hero.pos ); Sample.INSTANCE.play( Assets.SND_BEACON ); updateQuickslot(); }
Game.switchScene( InterlevelScene.class ); detach(hero.belongings.backpack);
Game.switchScene( InterlevelScene.class ); detach(hero.belongings.backpack);
@Override protected void onCast(final Hero hero) { if (returnDepth == -1){ setBeacon(hero); } else { GameScene.show(new WndOptions(Messages.titleCase(name()), Messages.get(BeaconOfReturning.class, "wnd_body"), Messages.get(BeaconOfReturning.class, "wnd_set"), Messages.get(BeaconOfReturning.class, "wnd_return")){ @Override protected void onSelect(int index) { if (index == 0){ setBeacon(hero); } else if (index == 1){ returnBeacon(hero); } } }); } }
private void setBeacon(Hero hero ){ returnDepth = Dungeon.depth; returnPos = hero.pos; hero.spend( 1f ); hero.busy(); GLog.i( Messages.get(this, "set") ); hero.sprite.operate( hero.pos ); Sample.INSTANCE.play( Assets.SND_BEACON ); updateQuickslot(); }