public static void bundleToFile( String fileName, Bundle bundle ) throws IOException{ bundleToStream( Game.instance.openFileOutput( fileName, Game.MODE_PRIVATE ), bundle); }
public static void bundleToFile( String fileName, Bundle bundle ) throws IOException{ bundleToStream( Game.instance.openFileOutput( fileName ), bundle); }
public static void saveGlobal() { Bundle bundle = null; if (saveNeeded) { bundle = new Bundle(); store(bundle, global); try { OutputStream output = Game.instance.openFileOutput(BADGES_FILE, Game.MODE_PRIVATE); Bundle.write( bundle, output ); output.close(); saveNeeded = false; } catch (IOException e) { } } }
public static void saveLevel() throws IOException { Bundle bundle = new Bundle(); bundle.put( LEVEL, level ); OutputStream output = Game.instance.openFileOutput( Utils.format( depthFile( hero.heroClass ), depth ), Game.MODE_PRIVATE ); Bundle.write( bundle, output ); output.close(); }
public void save( int difficulty ) { Bundle bundle = new Bundle(); bundle.put( RECORDS, records ); bundle.put( LATEST, lastRecord ); bundle.put( TOTAL, totalNumber ); bundle.put( WON, wonNumber ); String rankingsFile = Utils.format( RANKINGS_FILE, difficulty ); try { OutputStream output = Game.instance.openFileOutput( rankingsFile, Game.MODE_PRIVATE ); Bundle.write( bundle, output ); output.close(); } catch (Exception e) { } }
OutputStream output = Game.instance.openFileOutput( bonesFile, Game.MODE_PRIVATE ); Bundle.write( bundle, output ); output.close();
bundle.put( BADGES, badges ); OutputStream output = Game.instance.openFileOutput( fileName, Game.MODE_PRIVATE ); Bundle.write( bundle, output ); output.close();