@Override public void restoreFromBundle(Bundle bundle) { super.restoreFromBundle(bundle); int[] values = bundle.getIntArray( PRESSES ); for (int value : values) presses.add(value); partialTime = bundle.getFloat( PARTIALTIME ); } }
@Override public void restoreFromBundle(Bundle bundle) { super.restoreFromBundle(bundle); int[] values = bundle.getIntArray( PRESSES ); for (int value : values) presses.add(value); partialTime = bundle.getFloat( PARTIALTIME ); } }
public static void restoreRoomsFromBundle( Bundle bundle ) { runSecrets.clear(); if (bundle.contains( ROOMS )) { for (Class<? extends SecretRoom> type : bundle.getClassArray(ROOMS)) { if (type != null) runSecrets.add(type); } regionSecretsThisRun = bundle.getIntArray(REGIONS); } else { initForRun(); ShatteredPixelDungeon.reportException(new Exception("secrets array didn't exist!")); } }
public static void restoreRoomsFromBundle( Bundle bundle ) { runSecrets.clear(); if (bundle.contains( ROOMS )) { for (Class<? extends SecretRoom> type : bundle.getClassArray(ROOMS)) { if (type != null) runSecrets.add(type); } regionSecretsThisRun = bundle.getIntArray(REGIONS); } else { initForRun(); ShatteredPixelDungeon.reportException(new Exception("secrets array didn't exist!")); } }
@Override public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle(bundle); int[] data = bundle.getIntArray( CUR ); if (data != null) { int start = bundle.getInt( START ); for (int i=0; i < data.length; i++) { cur[i + start] = data[i]; volume += data[i]; } } if (Level.resizingNeeded) { int[] cur = new int[Level.LENGTH]; Arrays.fill(cur, 0); int loadedMapSize = Level.loadedMapSize; for (int i=0; i < loadedMapSize; i++) { System.arraycopy( this.cur, i * loadedMapSize, cur, i * Level.WIDTH, loadedMapSize ); } this.cur = cur; } }
@Override public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle( bundle ); if (bundle.contains( CUR )) { cur = new int[bundle.getInt(LENGTH)]; off = new int[cur.length]; int[] data = bundle.getIntArray(CUR); int start = bundle.getInt(START); for (int i = 0; i < data.length; i++) { cur[i + start] = data[i]; volume += data[i]; } } }
@Override public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle( bundle ); if (bundle.contains( CUR )) { cur = new int[bundle.getInt(LENGTH)]; off = new int[cur.length]; int[] data = bundle.getIntArray(CUR); int start = bundle.getInt(START); for (int i = 0; i < data.length; i++) { cur[i + start] = data[i]; volume += data[i]; } } }
customWalls = new HashSet<>(); map = bundle.getIntArray( MAP );
customWalls = new HashSet<>(); map = bundle.getIntArray( MAP );
plants = new SparseArray<Plant>(); map = bundle.getIntArray( MAP ); visited = bundle.getBooleanArray( VISITED ); mapped = bundle.getBooleanArray( MAPPED );
int[] ironKeys = bundle.getIntArray( "ironKeys" ); for (int i = 0; i < ironKeys.length; i++){ if (ironKeys[i] > 0){ int[] specialKeys = bundle.getIntArray( "specialKeys" ); for (int i = 0; i < specialKeys.length; i++){ if (specialKeys[i] > 0){
int[] ironKeys = bundle.getIntArray( "ironKeys" ); for (int i = 0; i < ironKeys.length; i++){ if (ironKeys[i] > 0){ int[] specialKeys = bundle.getIntArray( "specialKeys" ); for (int i = 0; i < specialKeys.length; i++){ if (specialKeys[i] > 0){
LimitedDrops.legacyRestore( bundle.getIntArray("limiteddrops") ); } else { LimitedDrops.restore( bundle.getBundle(LIMDROPS) ); int ids[] = bundle.getIntArray( CHAPTERS ); if (ids != null) { for (int id : ids) {
LimitedDrops.legacyRestore( bundle.getIntArray("limiteddrops") ); } else { LimitedDrops.restore( bundle.getBundle(LIMDROPS) ); int ids[] = bundle.getIntArray( CHAPTERS ); if (ids != null) { for (int id : ids) {
int ids[] = bundle.getIntArray( CHAPTERS ); if (ids != null) { for (int id : ids) {