public override void ApplicationDidFinishLaunching(CCApplication application, CCWindow mainWindow) { GameAppDelegate.mainWindow = mainWindow; director = new CCDirector(); application.PreferMultiSampling = false; application.ContentRootDirectory = "Content"; application.ContentSearchPaths.Add("animations"); application.ContentSearchPaths.Add("fonts"); application.ContentSearchPaths.Add("images"); application.ContentSearchPaths.Add("levels"); application.ContentSearchPaths.Add("sounds"); CCSize windowSize = mainWindow.WindowSizeInPixels; // Use the SNES resolution: float desiredWidth = 256.0f; float desiredHeight = 224.0f; CCScene.SetDefaultDesignResolution(desiredWidth, desiredHeight, CCSceneResolutionPolicy.ShowAll); mainWindow.AddSceneDirector(director); var scene = new LevelSelectScene(mainWindow); // Can skip to the GmameScene by using this line instead: //var scene = new GameScene(mainWindow); director.RunWithScene(scene); }
public override void ApplicationDidFinishLaunching(CCApplication application, CCWindow mainWindow) { GameDelegate.mainWindow = mainWindow; director = mainWindow.DefaultDirector; application.PreferMultiSampling = false; application.ContentRootDirectory = "Content"; application.ContentSearchPaths.Add("animations"); application.ContentSearchPaths.Add("fonts"); application.ContentSearchPaths.Add("images"); application.ContentSearchPaths.Add("levels"); application.ContentSearchPaths.Add("sounds"); // Use the SNES resolution: float desiredWidth = 256.0f; float desiredHeight = 224.0f; CCScene.SetDefaultDesignResolution(desiredWidth, desiredHeight, CCSceneResolutionPolicy.ShowAll); // TODO: Doesn't work! Fix it //CCSimpleAudioEngine.SharedEngine.PlayBackgroundMusic("CoinTimeSong", loop: true); // Make the audio a little quieter: CCSimpleAudioEngine.SharedEngine.EffectsVolume = .3f; var scene = new LevelSelectScene(mainWindow); // Can skip to the GmameScene by using this line instead: //var scene = new GameScene(mainWindow); mainWindow.DisplayStats = true; mainWindow.RunWithScene(scene); }
public static void GoToLevelSelectScene() { CCSimpleAudioEngine.SharedEngine.StopBackgroundMusic(true); CCSimpleAudioEngine.SharedEngine.PlayEffect("Button");/* Donwloaded from http://www.pachd.com/button-sounds-2.html*/ var scene = new LevelSelectScene(mainWindow); director.ReplaceScene(scene); }
public override void ApplicationDidFinishLaunching(CCApplication application, CCWindow mainWindow) { GameAppDelegate.mainWindow = mainWindow; director = new CCDirector(); application.PreferMultiSampling = false; application.ContentRootDirectory = "Content"; application.ContentSearchPaths.Add("animations"); application.ContentSearchPaths.Add("fonts"); application.ContentSearchPaths.Add("images"); application.ContentSearchPaths.Add("levels"); application.ContentSearchPaths.Add("sounds"); #if __IOS__ application.ContentSearchPaths.Add("sounds/iOS/"); #else // android application.ContentSearchPaths.Add("sounds/Android/"); #endif CCSize windowSize = mainWindow.WindowSizeInPixels; // Use the SNES resolution: float desiredWidth = 256.0f; float desiredHeight = 224.0f; CCScene.SetDefaultDesignResolution(desiredWidth, desiredHeight, CCSceneResolutionPolicy.ShowAll); mainWindow.AddSceneDirector(director); CCSimpleAudioEngine.SharedEngine.PlayBackgroundMusic("CoinTimeSong", loop: true); // Make the audio a little quieter: CCSimpleAudioEngine.SharedEngine.EffectsVolume = .3f; var scene = new LevelSelectScene(mainWindow); // Can skip to the GmameScene by using this line instead: //var scene = new GameScene(mainWindow); director.RunWithScene(scene); }
public static void GoToLevelSelectScene() { var scene = new LevelSelectScene(mainWindow); director.ReplaceScene(scene); }