Java Code Examples for com.watabou.utils.Bundle#getFloat()
The following examples show how to use
com.watabou.utils.Bundle#getFloat() .
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: Berserk.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 6 votes |
@Override public void restoreFromBundle(Bundle bundle) { super.restoreFromBundle(bundle); //pre-0.6.5 saves if (bundle.contains("exhaustion")){ state = State.RECOVERING; } else { state = bundle.getEnum(STATE, State.class); } if (bundle.contains(POWER)){ power = bundle.getFloat(POWER); } else { power = 1f; } if (state == State.RECOVERING) levelRecovery = bundle.getFloat(LEVEL_RECOVERY); }
Example 2
Source File: Wand.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 6 votes |
@Override public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle( bundle ); usesLeftToID = bundle.getInt( USES_LEFT_TO_ID ); availableUsesToID = bundle.getInt( AVAILABLE_USES ); //pre-0.7.2 saves if (bundle.contains( "unfamiliarity" )){ usesLeftToID = Math.min(10, bundle.getInt( "unfamiliarity" )); availableUsesToID = USES_TO_ID/2f; } curCharges = bundle.getInt( CUR_CHARGES ); curChargeKnown = bundle.getBoolean( CUR_CHARGE_KNOWN ); partialCharge = bundle.getFloat( PARTIALCHARGE ); curseInfusionBonus = bundle.getBoolean(CURSE_INFUSION_BONUS); }
Example 3
Source File: Ring.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 5 votes |
@Override public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle( bundle ); levelsToID = bundle.getFloat( LEVELS_TO_ID ); //pre-0.7.2 saves if (bundle.contains( "unfamiliarity" )){ levelsToID = bundle.getInt( "unfamiliarity" ) / 200f; } }
Example 4
Source File: Healing.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 5 votes |
@Override public void restoreFromBundle(Bundle bundle) { super.restoreFromBundle(bundle); healingLeft = bundle.getInt(LEFT); percentHealPerTick = bundle.getFloat(PERCENT); flatHealPerTick = bundle.getInt(FLAT); }
Example 5
Source File: AdrenalineSurge.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 5 votes |
@Override public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle( bundle ); boost = bundle.getInt( BOOST ); //pre-0.7.1 if (bundle.contains(INTERVAL)) { interval = bundle.getFloat(INTERVAL); } else { interval = 800f; } }
Example 6
Source File: Ring.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 5 votes |
@Override public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle( bundle ); levelsToID = bundle.getFloat( LEVELS_TO_ID ); //pre-0.7.2 saves if (bundle.contains( "unfamiliarity" )){ levelsToID = bundle.getInt( "unfamiliarity" ) / 200f; } }
Example 7
Source File: Swiftthistle.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 5 votes |
@Override public void restoreFromBundle(Bundle bundle) { super.restoreFromBundle(bundle); int[] values = bundle.getIntArray( PRESSES ); for (int value : values) presses.add(value); left = bundle.getFloat(LEFT); }
Example 8
Source File: Statistics.java From pixel-dungeon with GNU General Public License v3.0 | 5 votes |
public static void restoreFromBundle( Bundle bundle ) { goldCollected = bundle.getInt( GOLD ); deepestFloor = bundle.getInt( DEEPEST ); enemiesSlain = bundle.getInt( SLAIN ); foodEaten = bundle.getInt( FOOD ); potionsCooked = bundle.getInt( ALCHEMY ); piranhasKilled = bundle.getInt( PIRANHAS ); nightHunt = bundle.getInt( NIGHT ); ankhsUsed = bundle.getInt( ANKHS ); duration = bundle.getFloat( DURATION ); amuletObtained = bundle.getBoolean( AMULET ); }
Example 9
Source File: Artifact.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 5 votes |
@Override public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle(bundle); exp = bundle.getInt( EXP ); if (chargeCap > 0) charge = Math.min( chargeCap, bundle.getInt( CHARGE )); else charge = bundle.getInt( CHARGE ); partialCharge = bundle.getFloat( PARTIALCHARGE ); }
Example 10
Source File: Sungrass.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 5 votes |
@Override public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle( bundle ); pos = bundle.getInt( POS ); partialHeal = bundle.getFloat( PARTIAL ); level = bundle.getInt( LEVEL ); }
Example 11
Source File: Artifact.java From unleashed-pixel-dungeon with GNU General Public License v3.0 | 5 votes |
@Override public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle(bundle); if (bundle.contains( IMAGE )) image = bundle.getInt( IMAGE ); exp = bundle.getInt( EXP ); charge = bundle.getInt( CHARGE ); partialCharge = bundle.getFloat( PARTIALCHARGE ); updateArtifact(); }
Example 12
Source File: Actor.java From unleashed-pixel-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public void restoreFromBundle( Bundle bundle ) { time = bundle.getFloat( TIME ); id = bundle.getInt( ID ); }
Example 13
Source File: Actor.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public void restoreFromBundle( Bundle bundle ) { time = bundle.getFloat( TIME ); id = bundle.getInt( ID ); }
Example 14
Source File: PrismaticGuard.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 4 votes |
@Override public void restoreFromBundle(Bundle bundle) { super.restoreFromBundle(bundle); HP = bundle.getFloat(HEALTH); }
Example 15
Source File: Burning.java From unleashed-pixel-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle(bundle); left = bundle.getFloat( LEFT ); }
Example 16
Source File: Poison.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 4 votes |
@Override public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle( bundle ); left = bundle.getFloat( LEFT ); }
Example 17
Source File: Poison.java From unleashed-pixel-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle( bundle ); left = bundle.getFloat( LEFT ); }
Example 18
Source File: FireImbue.java From unleashed-pixel-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle( bundle ); left = bundle.getFloat( LEFT ); }
Example 19
Source File: Poison.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle( bundle ); left = bundle.getFloat( LEFT ); }
Example 20
Source File: Actor.java From YetAnotherPixelDungeon with GNU General Public License v3.0 | 4 votes |
@Override public void restoreFromBundle( Bundle bundle ) { time = bundle.getFloat( TIME ); id = bundle.getInt( ID ); }