Java Code Examples for com.watabou.noosa.Game#getVar()

The following examples show how to use com.watabou.noosa.Game#getVar() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StartScene.java    From remixed-dungeon with GNU General Public License v3.0 6 votes vote down vote up
private void selectDifficulty() {

        WndOptions difficultyOptions = new WndOptions(Game.getVar(R.string.StartScene_DifficultySelect), Utils.EMPTY_STRING,
                Game.getVar(RemixedDungeon.donated() > 0 ? R.string.StartScene_DifficultyEasyNoAds : R.string.StartScene_DifficultyEasy),
                Game.getVar(RemixedDungeon.donated() > 0 ? R.string.StartScene_DifficultyNormalWithSavesNoAds : R.string.StartScene_DifficultyNormalWithSaves),
                Game.getVar(R.string.StartScene_DifficultyNormal),
                Game.getVar(R.string.StartScene_DifficultyExpert)) {
            @Override
            public void onSelect(final int index) {

                if (index < 2 && EuConsent.getConsentLevel() < EuConsent.NON_PERSONALIZED) {
                    Game.addToScene(new WndEuConsent() {
                        @Override
                        public void done() {
                            startNewGame(index);
                        }
                    });
                    return;
                }

                startNewGame(index);
            }
        };

        add(difficultyOptions);
    }
 
Example 2
Source File: SewerLevel.java    From remixed-dungeon with GNU General Public License v3.0 5 votes vote down vote up
@Override
public String tileName(int tile) {
	switch (tile) {
		case Terrain.WATER:
			return Game.getVar(R.string.Sewer_TileWater);
		default:
			return super.tileName(tile);
	}
}
 
Example 3
Source File: RingOfHerbalism.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
public String desc() {
	return isKnown() ? Game.getVar(R.string.RingOfHerbalism_Info) : super.desc();
}
 
Example 4
Source File: Sungrass.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
public String desc() {
	return Game.getVar(R.string.Sungrass_Desc);
}
 
Example 5
Source File: PotionOfMight.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
public String desc() {
	return Game.getVar(R.string.PotionOfMight_Info);
}
 
Example 6
Source File: Invisibility.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
public String name() {
	return Game.getVar(R.string.Invisibility_Info);
}
 
Example 7
Source File: Fadeleaf.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
public String desc() {
	return Game.getVar(R.string.Fadeleaf_Desc);
}
 
Example 8
Source File: Blindness.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
public String name() {
	return Game.getVar(R.string.Blindness_Info);
}
 
Example 9
Source File: ParalyticGas.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
public String tileDesc() {
	return Game.getVar(R.string.ParalyticGas_Info);
}
 
Example 10
Source File: WarHammer.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
public String desc() {
	return Game.getVar(R.string.WarHammer_Info);
}
 
Example 11
Source File: WandOfBlink.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
public String desc() {
	return Game.getVar(R.string.WandOfBlink_Info);
}
 
Example 12
Source File: WndSaveSlotSelect.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
public WndSaveSlotSelect(final boolean _saving) {
    this(_saving, Game.getVar(R.string.WndSaveSlotSelect_SelectSlot));
}
 
Example 13
Source File: LibraryBook.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
public String name() {
	return Game.getVar(R.string.LibraryBook_Name);
}
 
Example 14
Source File: Ghost.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
public String defenseVerb() {
	return Game.getVar(R.string.Ghost_Defense);
}
 
Example 15
Source File: Level.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
public String tileDesc(int tile) {

		switch (tile) {
			case Terrain.CHASM:
				return Game.getVar(R.string.Level_TileDescChasm);
			case Terrain.WATER:
				return Game.getVar(R.string.Level_TileDescWater);
			case Terrain.ENTRANCE:
				return Game.getVar(R.string.Level_TileDescEntrance);
			case Terrain.EXIT:
			case Terrain.UNLOCKED_EXIT:
				return Game.getVar(R.string.Level_TileDescExit);
			case Terrain.EMBERS:
				return Game.getVar(R.string.Level_TileDescEmbers);
			case Terrain.HIGH_GRASS:
				return Game.getVar(R.string.Level_TileDescHighGrass);
			case Terrain.LOCKED_DOOR:
				return Game.getVar(R.string.Level_TileDescLockedDoor);
			case Terrain.LOCKED_EXIT:
				return Game.getVar(R.string.Level_TileDescLockedExit);
			case Terrain.BARRICADE:
				return Game.getVar(R.string.Level_TileDescBarricade);
			case Terrain.SIGN:
				return Game.getVar(R.string.Level_TileDescSign);
			case Terrain.TOXIC_TRAP:
			case Terrain.FIRE_TRAP:
			case Terrain.PARALYTIC_TRAP:
			case Terrain.POISON_TRAP:
			case Terrain.ALARM_TRAP:
			case Terrain.LIGHTNING_TRAP:
			case Terrain.GRIPPING_TRAP:
			case Terrain.SUMMONING_TRAP:
				return Game.getVar(R.string.Level_TileDescTrap);
			case Terrain.INACTIVE_TRAP:
				return Game.getVar(R.string.Level_TileDescInactiveTrap);
			case Terrain.STATUE:
			case Terrain.STATUE_SP:
				return Game.getVar(R.string.Level_TileDescStatue);
			case Terrain.ALCHEMY:
				return Game.getVar(R.string.Level_TileDescAlchemy);
			case Terrain.EMPTY_WELL:
				return Game.getVar(R.string.Level_TileDescEmptyWell);
			default:
				if (tile >= Terrain.WATER_TILES) {
					return tileDesc(Terrain.WATER);
				}
				if ((TerrainFlags.flags[tile] & TerrainFlags.PIT) != 0) {
					return tileDesc(Terrain.CHASM);
				}
				return Utils.EMPTY_STRING;
		}
	}
 
Example 16
Source File: WndJournal.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
LogbookTab() {
    super(WndJournal.this, Game.getVar(R.string.WndJournal_Logbook));
}
 
Example 17
Source File: ShortSword.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
public String desc() {
	return Game.getVar(R.string.ShortSword_Info);
}
 
Example 18
Source File: LiquidFlame.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
@Override
public String tileDesc() {
	return Game.getVar(R.string.Fire_Info);
}
 
Example 19
Source File: WndFortuneTeller.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
public WndFortuneTeller(FortuneTellerNPC fortuneTellerNPC, final Char hero) {

		super(fortuneTellerNPC, instructions(hero));

		this.hero = hero;

		float y = height + 2*GAP;

		RedButton btnYes = new RedButton( Game.getVar(R.string.Wnd_Button_Yes) + " ( "+ goldCost + " )" ) {
			@Override
			protected void onClick() {
				boolean hasTarget = false;

				for (Item item : hero.getBelongings()){
					if (!item.isIdentified()){
						hasTarget = true;
						break;
					}
				}

				if (hasTarget) {
					identify();
					hide();
					hero.spendGold(goldCost);
				} else{
					hide();
					GameScene.show(new WndQuest(fortuneTellerNPC, Game.getVar(R.string.WndFortuneTeller_No_Item)));
				}
			}
		};

		btnYes.setRect( 0, y, STD_WIDTH, BUTTON_HEIGHT );
		add( btnYes );
		btnYes.enable(!(hero.gold()< goldCost));

		RedButton btnNo = new RedButton( Game.getVar(R.string.Wnd_Button_No) ) {
			@Override
			protected void onClick() {
				hide();
			}
		};
		btnNo.setRect( 0, btnYes.bottom(), STD_WIDTH, BUTTON_HEIGHT );
		add( btnNo );
		
		resize( STD_WIDTH, (int)btnNo.bottom() );
	}
 
Example 20
Source File: AboutScene.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
private static String getTRN() {
	return Game.getVar(R.string.AboutScene_Translation) + "\n\t" + Game.getVar(R.string.AboutScene_Translation_Names);
}