/// <summary> /// Carica tutti i file bmp/png e wav/mp3 di una cartella (tale path deve già contenere il backslash finale, prima del nome del file). /// </summary> /// <param name="logicPathDest">Cartella "logica" di destinazione</param> /// <param name="realPathSource">Cartella di sorgente del sistema operativo (deve già contenere il "\" finale)</param> protected void loadMediaFiles(string logicPathDest, string realPathSource) { char[] c = new char[] { '\\' }; string[] s = new string[] { }; foreach (string f in GameApp.getFileNames(realPathSource)) { if (f.EndsWith(".bmp") || f.EndsWith(".png")) { root.InsertFile(logicPathDest, f, new ImageResourceItem(realPathSource + f)); } else if (f.EndsWith(".wav") || f.EndsWith(".mp3")) { root.InsertFile(logicPathDest, f, new SoundResourceItem(realPathSource + f)); } } }
private void LoadingScreenSetup() { ResourceDirectory root = this.container.getResourceDirectory; root.NewDirectory(GameConstraints.OtherPaths.CachedLevelsDir); root.NewDirectory(GameConstraints.OtherPaths.BonusLevelsDir); root.NewDirectory(GameConstraints.OtherPaths.PermanentLevelsDir); root.NewDirectory(GameConstraints.OtherPaths.MetadataLogicDir); root.InsertFile( GameConstraints.OtherPaths.MetadataLogicDir, GameConstraints.OtherPaths.LoaderResourceName, new LoadResourceItem(root) ); root.InsertFile( GameConstraints.OtherPaths.MetadataLogicDir, FileNames.HighscoresFileName, new HighScoresResourceItem() ); container.addScene(GameConstraints.LoadingScreen.ID, new LoadingScreen(container)); }