public void passToGame(int i)
        {
            GameData.scores = new int[GameData.players];
            CCSimpleAudioEngine.SharedEngine.StopEffect(mid);
            var newScene = new CCScene(Window);
            if(i == 1)
            {
                var silla = new SillaMusicalLayer();
                newScene.AddChild(silla);
                Window.DefaultDirector.ReplaceScene(newScene);

            }
            else if (i == 2)
            {
                var dictado = new DictadoLayercs();
                newScene.AddChild(dictado);
                Window.DefaultDirector.ReplaceScene(newScene);

            }
            else if (i == 3)
            {
                var maleta = new MaletaLayer();
                newScene.AddChild(maleta);
                Window.DefaultDirector.ReplaceScene(newScene);

            }
            else
            {
                var tablero = new Tablero();
                newScene.AddChild(tablero);
                Window.DefaultDirector.ReplaceScene(newScene);
            }
        }
Exemplo n.º 2
0
		public override void ApplicationDidFinishLaunching (CCApplication application, CCWindow mainWindow)
		{
			application.PreferMultiSampling = false;
			application.ContentRootDirectory = "Content";
			application.ContentSearchPaths.Add ("animations");
			application.ContentSearchPaths.Add ("fonts");
			application.ContentSearchPaths.Add ("sounds");

			CCSize windowSize = mainWindow.WindowSizeInPixels;

			float desiredHeight = 1024.0f;
			float desiredWidth = 768.0f;
    
			// This will set the world bounds to be (0,0, w, h)
			// CCSceneResolutionPolicy.ShowAll will ensure that the aspect ratio is preserved
			CCScene.SetDefaultDesignResolution (desiredWidth, desiredHeight, CCSceneResolutionPolicy.ShowAll);
            
           
			CCScene scene = new CCScene (mainWindow);
			GameLayer gameLayer = new GameLayer ();

			scene.AddChild (gameLayer);

			mainWindow.RunWithScene (scene);
		}
Exemplo n.º 3
0
        /// <summary>
        ///  Implement CCDirector and CCScene init code here.
        /// </summary>
        /// <returns>
        ///  true  Initialize success, app continue.
        ///  false Initialize failed, app terminate.
        /// </returns>
        public override bool ApplicationDidFinishLaunching()
        {
            ContentRootDirectory = "Content";

            //CCSpriteFontCache.FontScale = 0.6f;
            //CCSpriteFontCache.RegisterFont("MarkerFelt", 22);

            CCDirector director = CCDirector.SharedDirector;
            director.DisplayStats = true;
            director.AnimationInterval = 1.0 / 60;

            // turn on display FPS
            director.DisplayStats = true;

            // set FPS. the default value is 1.0/60 if you don't call this
            director.AnimationInterval = 1.0 / 60;

            CCScene scene = new CCScene();

            var label = TestClass.PCLLabel(AppDelegate.PlatformMessage());

            scene.AddChild(label);

            director.RunWithScene(scene);

            return true;
        }
Exemplo n.º 4
0
        public void openTest(string pCCBFileName, string pCCNodeName, CCNodeLoader pCCNodeLoader)
        {
            /* Create an autorelease CCNodeLoaderLibrary. */
            CCNodeLoaderLibrary ccNodeLoaderLibrary = new CCNodeLoaderLibrary();

            ccNodeLoaderLibrary.RegisterCCNodeLoader("TestHeaderLayer", new Loader<TestHeaderLayer>());
            if (pCCNodeName != null && pCCNodeLoader != null)
            {
                ccNodeLoaderLibrary.RegisterCCNodeLoader(pCCNodeName, pCCNodeLoader);
            }

            /* Create an autorelease CCBReader. */
            var ccbReader = new CCBReader(ccNodeLoaderLibrary);

            /* Read a ccbi file. */
            // Load the scene from the ccbi-file, setting this class as
            // the owner will cause lblTestTitle to be set by the CCBReader.
            // lblTestTitle is in the TestHeader.ccbi, which is referenced
            // from each of the test scenes.
            CCNode node = ccbReader.ReadNodeGraphFromFile(pCCBFileName, this);

            mTestTitleLabelTTF.Text = (pCCBFileName);

            CCScene scene = new CCScene(Scene);
            scene.AddChild(node);

            /* Push the new scene with a fancy transition. */
            CCColor3B transitionColor = new CCColor3B();
            transitionColor.R = 0;
            transitionColor.G = 0;
            transitionColor.B = 0;

            Scene.Director.PushScene(new CCTransitionFade(0.5f, scene, transitionColor));
        }
Exemplo n.º 5
0
        public override bool ApplicationDidFinishLaunching()
        {
            ContentRootDirectory = "Content";

            CCSpriteFontCache.FontScale = 0.6f;
            CCSpriteFontCache.RegisterFont("MarkerFelt", 22);

            CCDirector director = CCDirector.SharedDirector;
            director.DisplayStats = true;
            director.AnimationInterval = 1.0 / 60;

            CCSize designSize = new CCSize(480, 320);

            if (CCDrawManager.FrameSize.Height > 320)
            {
                CCSize resourceSize = new CCSize(960, 640);
                ContentSearchPaths.Add("hd");
                director.ContentScaleFactor = resourceSize.Height / designSize.Height;
            }

            CCDrawManager.SetDesignResolutionSize(designSize.Width, designSize.Height, CCResolutionPolicy.ShowAll);

            CCScene scene = new CCScene();

            var label = TestClass.PCLLabel(AppDelegate.PlatformMessage());

            scene.AddChild(label);

            director.RunWithScene(scene);

            return true;
        }
        public override void ApplicationDidFinishLaunching(CCApplication application, CCWindow mainWindow)
        {
            application.PreferMultiSampling = false;
            application.ContentRootDirectory = "Content";
            application.ContentSearchPaths.Add ("animations");
            application.ContentSearchPaths.Add ("fonts");
            application.ContentSearchPaths.Add ("sounds");

            CCSize windowSize = mainWindow.WindowSizeInPixels;

            float desiredHeight = 512.0f;
            float desiredWidth = 384.0f;

            // This will set the world bounds to be (0,0, w, h).
            // CCSceneResolutionPolicy.ShowAll will ensure that the aspect ratio is preserved.
            CCScene.SetDefaultDesignResolution (desiredWidth, desiredHeight, CCSceneResolutionPolicy.ShowAll);

            // Determine whether to use the high or low def versions of our images.
            // Make sure the default texel to content size ratio is set correctly.
            // Of course you're free to have a finer set of image resolutions e.g (ld, hd, super-hd).
            if (desiredWidth < windowSize.Width) {
                application.ContentSearchPaths.Add ("images/hd");
                CCSprite.DefaultTexelToContentSizeRatio = 2.0f;
            } else {
                application.ContentSearchPaths.Add ("images/ld");
                CCSprite.DefaultTexelToContentSizeRatio = 1.0f;
            }

            CCScene scene = new CCScene (mainWindow);
            GameLayer gameLayer = new GameLayer ();

            scene.AddChild (gameLayer);

            mainWindow.RunWithScene (scene);
        }
Exemplo n.º 7
0
 public static void runTableViewTest()
 {
     var pScene = new CCScene(AppDelegate.SharedWindow, AppDelegate.SharedViewport);
     var pLayer = new TableViewTestLayer();
     pScene.AddChild(pLayer);
     AppDelegate.SharedWindow.DefaultDirector.ReplaceScene(pScene);
 }
Exemplo n.º 8
0
        public override void ApplicationDidFinishLaunching(CCApplication application, CCWindow mainWindow)
        {
            application.ContentRootDirectory = "Content";
            var windowSize = mainWindow.WindowSizeInPixels;

            var desiredWidth = 1024.0f;
            var desiredHeight = 768.0f;
            
            // This will set the world bounds to be (0,0, w, h)
            // CCSceneResolutionPolicy.ShowAll will ensure that the aspect ratio is preserved
            mainWindow.SetDesignResolutionSize(desiredWidth, desiredHeight, CCSceneResolutionPolicy.ShowAll);
            
            // Determine whether to use the high or low def versions of our images
            // Make sure the default texel to content size ratio is set correctly
            // Of course you're free to have a finer set of image resolutions e.g (ld, hd, super-hd)
            if (desiredWidth < windowSize.Width)
            {
                application.ContentSearchPaths.Add("hd");
                CCSprite.DefaultTexelToContentSizeRatio = 2.0f;
            }
            else
            {
                application.ContentSearchPaths.Add("ld");
                CCSprite.DefaultTexelToContentSizeRatio = 1.0f;
            }
            
            var scene = new CCScene(mainWindow);
            var introLayer = new IntroLayer();

            scene.AddChild(introLayer);

            mainWindow.RunWithScene(scene);
        }
Exemplo n.º 9
0
        /// <summary>
        /// Called when app launched.
        /// </summary>
        /// <param name="application">application object</param>
        /// <param name="mainWindow">main window</param>
        public override void ApplicationDidFinishLaunching(CCApplication application, CCWindow mainWindow)
        {
            application.PreferMultiSampling = false;

            application.ContentRootDirectory = "Content";
            var windowSize = mainWindow.WindowSizeInPixels;

            var desiredHeight = 1024.0f;
            var desiredWidth = 768.0f;

            // This will set the world bounds to be (0,0, w, h)
            // CCSceneResolutionPolicy.ShowAll will ensure that the aspect ratio is preserved
            CCScene.SetDefaultDesignResolution(desiredWidth, desiredHeight, CCSceneResolutionPolicy.ShowAll);

            CCSimpleAudioEngine.SharedEngine.PreloadEffect("sounds/hit_paddle");
            CCSimpleAudioEngine.SharedEngine.PreloadEffect("sounds/hit_wall");
            CCSimpleAudioEngine.SharedEngine.PreloadEffect("sounds/hit_off");

            var scene = new CCScene(mainWindow);
            var introLayer = new IntroLayer();

            scene.AddChild(introLayer);

            mainWindow.RunWithScene(scene);
        }
Exemplo n.º 10
0
        public void switchLayer(float dt)
        {
            //unschedule(schedule_selector(Bug624Layer::switchLayer));

            CCScene scene = new CCScene(Scene);
            scene.AddChild(new Bug624Layer(), 0);
            Scene.Director.ReplaceScene(new CCTransitionFade(2.0f, scene, new CCColor3B { R = 255, G = 0, B = 0 }));
        }
Exemplo n.º 11
0
        public static CCScene GameScene(CCWindow mainWindow)
        {
            var scene = new CCScene (mainWindow);
            var layer = new MonsterRun();

            scene.AddChild(layer);

            return scene;
        }
Exemplo n.º 12
0
		public static CCScene SceneWithScore (int score)
		{
			var scene = new CCScene ();
			var layer = new GameOverLayer (score);

			scene.AddChild (layer);

			return scene;
		}
 public void passToGame()
 {
     GameData.scores = new int[GameData.players];
     CCSimpleAudioEngine.SharedEngine.StopEffect(mid);
     var newScene = new CCScene(Window);
     var silla = new Tablero();
     newScene.AddChild(silla);
     Window.DefaultDirector.ReplaceScene(newScene);
 }
Exemplo n.º 14
0
        public static CCScene GameStartLayerScene (CCWindow mainWindow)
        {
            var scene = new CCScene (mainWindow);
            var layer = new GameStartLayer ();

            scene.AddChild (layer);

            return scene;
        }
Exemplo n.º 15
0
        public static CCScene SceneWithScore (CCWindow mainWindow, int score)
        {
            var scene = new CCScene (mainWindow);
            var layer = new GameOverLayer (score);

            scene.AddChild (layer);

            return scene;
        }
Exemplo n.º 16
0
        public static void runTouchesTest()
        {
            s_nTouchCurCase = 0;
            CCScene pScene = new CCScene(AppDelegate.SharedWindow, AppDelegate.SharedViewport);
            CCLayer pLayer = new TouchesPerformTest1(true, TEST_COUNT, s_nTouchCurCase);

            pScene.AddChild(pLayer);

            AppDelegate.SharedWindow.DefaultDirector.ReplaceScene(pScene);
        }
Exemplo n.º 17
0
        public override void ApplicationDidFinishLaunching(CCApplication application, CCWindow mainWindow)
        {
            SharedWindow = mainWindow;

            DefaultResolution = new CCSize(
                application.MainWindow.WindowSizeInPixels.Width,
                application.MainWindow.WindowSizeInPixels.Height);

            application.ContentRootDirectory = "Content";

            CCScene scene = new CCScene(mainWindow);
            CCLayer layer = new IntroLayer(DefaultResolution);

            var b = new CozyColorSampleButton(100, 100, 158, 158)
            {
                NormalColor     = new CCColor4B(255, 0, 0),
                ClickedColor    = new CCColor4B(0, 255, 0),
                Text            = "Hello Bttton",
                HasBorder       = true,
            };

            b.OnClick += () =>
            {
            };

            var list = new CozySampleListView()
            {
                ContentSize = new CCSize(350, 350),
                Orientation = ControlOrientation.Vertical,
                Position    = new CCPoint(100, 100),
                HasBorder   = true,
            };
            layer.AddChild(list);

            list.AddItem(new CozySampleListViewItemSprite(new CCSprite("gold"))

            {
                MarginBottom    = 10,
                MarginTop       = 10,
                HasBorder       = true,
            });
            list.AddItem(b);
            list.AddItem(new CozySampleListViewItemSprite(new CCSprite("gold"))

            {
                MarginBottom    = 10,
                MarginTop       = 10,
                HasBorder       = true,
            });

            layer.AddEventListener(b.EventListener, layer);

            scene.AddChild(layer);
            mainWindow.RunWithScene(scene);
        }
Exemplo n.º 18
0
 public new static CCScene sceneWithTitle(string title)
 {
     var pScene = new CCScene (AppDelegate.SharedWindow, AppDelegate.SharedViewport);
     var controlLayer = new CCControlSwitchTest();
     if (controlLayer != null)
     {
         controlLayer.getSceneTitleLabel().Text = (title);
         pScene.AddChild(controlLayer);
     }
     return pScene;
 }
 public static CCScene SceneWithTitle(string title)
 {
     var scene = new CCScene (AppDelegate.SharedWindow);
     var controlLayer = new CCControlSliderTest();
     if (controlLayer != null)
     {
         controlLayer.SceneTitleLabel.Text = (title);
         scene.AddChild(controlLayer);
     }
     return scene;
 }
Exemplo n.º 20
0
 public static CCScene sceneWithTitle(string title)
 {
     var pScene = new CCScene(AppDelegate.SharedWindow);
     var controlLayer = new CCControlColourPickerTest();
     if (controlLayer != null)
     {
         controlLayer.getSceneTitleLabel().Text = (title);
         pScene.AddChild(controlLayer);
     }
     return pScene;
 }
Exemplo n.º 21
0
		public static CCScene CreateScene (CCWindow mainWindow) 
		{
			var scene = new CCScene(mainWindow);
			var layer = new IntroLayer();

			// add layer as a child to scene
			scene.AddChild(layer);

			// return the scene
			return scene;
		}
Exemplo n.º 22
0
        public override void ApplicationDidFinishLaunching(CCApplication application, CCWindow mainWindow)
        {

            //application.AllowUserResizing = true;
            application.PreferMultiSampling = false;
            application.ContentRootDirectory = "Content";

            application.ContentSearchResolutionOrder = new List<string>() { "", "images", "fonts" };

            sharedWindow = mainWindow;

            CCSize winSize = mainWindow.WindowSizeInPixels;
            CCScene.SetDefaultDesignResolution(winSize.Width, winSize.Height, CCSceneResolutionPolicy.ShowAll);
            //CCScene.SetDefaultDesignResolution(winSize.Width/2, winSize.Height/2, CCSceneResolutionPolicy.ShowAll);


            #if WINDOWS || WINDOWSGL || WINDOWSDX 
            //application.PreferredBackBufferWidth = 1024;
            //application.PreferredBackBufferHeight = 768;
            #elif MACOS
            //application.PreferredBackBufferWidth = 960;
            //application.PreferredBackBufferHeight = 640;
            #endif

            #if WINDOWS_PHONE8
            application.HandleMediaStateAutomatically = false; // Bug in MonoGame - https://github.com/Cocos2DXNA/cocos2d-xna/issues/325
            #endif

            //CCSpriteFontCache.FontScale = 0.6f;
            CCSpriteFontCache.RegisterFont("arial", 12, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 38, 50, 64);
            CCSpriteFontCache.RegisterFont("MarkerFelt", 16, 18, 22, 32);
            CCSpriteFontCache.RegisterFont("MarkerFelt-Thin", 12, 18);
            CCSpriteFontCache.RegisterFont("Paint Boy", 26);
            CCSpriteFontCache.RegisterFont("Schwarzwald Regular", 26);
            CCSpriteFontCache.RegisterFont("Scissor Cuts", 26);
            CCSpriteFontCache.RegisterFont("A Damn Mess", 26);
            CCSpriteFontCache.RegisterFont("Abberancy", 26);
            CCSpriteFontCache.RegisterFont("Abduction", 26);

            mainWindow.DisplayStats = true;
            mainWindow.StatsScale = 1;

            //            if (mainWindow.WindowSizeInPixels.Height > 320)
            //            {
            //                application.ContentSearchPaths.Insert(0,"HD");
            //            }
            //CCApplication.DefaultTexelToContentSizeRatio = 2f;
            CCScene scene = new CCScene(sharedWindow);
            CCLayer layer = new TestController();

            scene.AddChild(layer);
            sharedWindow.RunWithScene(scene);
        }
Exemplo n.º 23
0
        public override void ApplicationDidFinishLaunching(CCApplication application, CCWindow mainWindow)
        {
            //application.SupportedOrientations = CCDisplayOrientation.LandscapeRight | CCDisplayOrientation.LandscapeLeft;
            //application.AllowUserResizing = true;
            //application.PreferMultiSampling = false;
            application.ContentRootDirectory = "Content";

            sharedWindow = mainWindow;

            mainWindow.SetDesignResolutionSize(960, 640, CCSceneResolutionPolicy.ShowAll);

            #if WINDOWS || WINDOWSGL || WINDOWSDX 
			//application.PreferredBackBufferWidth = 1024;
			//application.PreferredBackBufferHeight = 768;
            #elif MACOS
            //application.PreferredBackBufferWidth = 960;
            //application.PreferredBackBufferHeight = 640;
            #endif

            #if WINDOWS_PHONE8
            application.HandleMediaStateAutomatically = false; // Bug in MonoGame - https://github.com/Cocos2DXNA/cocos2d-xna/issues/325
            #endif

            CCSpriteFontCache.FontScale = 0.6f;
            CCSpriteFontCache.RegisterFont("arial", 12, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 38, 50, 64);
            CCSpriteFontCache.RegisterFont("MarkerFelt", 16, 18, 22, 32);
            CCSpriteFontCache.RegisterFont("MarkerFelt-Thin", 12, 18);
            CCSpriteFontCache.RegisterFont("Paint Boy", 26);
            CCSpriteFontCache.RegisterFont("Schwarzwald Regular", 26);
            CCSpriteFontCache.RegisterFont("Scissor Cuts", 26);
            CCSpriteFontCache.RegisterFont("A Damn Mess", 26);
            CCSpriteFontCache.RegisterFont("Abberancy", 26);
            CCSpriteFontCache.RegisterFont("Abduction", 26);

            //sharedDirector = new CCDirector();
            //director.DisplayStats = true;
            //director.AnimationInterval = 1.0 / 60;


//            if (sharedWindow.WindowSizeInPixels.Height > 320)
//            {
//                application.ContentSearchPaths.Insert(0,"HD");
//            }

            //sharedWindow.AddSceneDirector(sharedDirector);

            CCScene scene = new CCScene(sharedWindow);
            CCLayer layer = new TestController();

            scene.AddChild(layer);
            sharedWindow.RunWithScene(scene);
        }
Exemplo n.º 24
0
		public static CCScene GameStartLayerScene (CCWindow mainWindow)
		{
			var scene = new CCScene (mainWindow);

			var winSize = mainWindow.WindowSizeInPixels;
			const float wbase = 640.0f;
			const float hbase = 1136.0f;

			var layer = new GameStartLayer (winSize.Width / wbase, winSize.Height / hbase);

			scene.AddChild (layer);

			return scene;
		}
        public override void ApplicationDidFinishLaunching(CCApplication application, CCWindow mainWindow)
        {
            application.PreferMultiSampling = false;
            application.ContentRootDirectory = "Content";
            application.ContentSearchPaths.Add("animations");
            application.ContentSearchPaths.Add("fonts");
            application.ContentSearchPaths.Add("sounds");

            CCSize windowSize = mainWindow.WindowSizeInPixels;

            float desiredWidth = 1024.0f;
            float desiredHeight = 768.0f;
            
            // This will set the world bounds to be (0,0, w, h)
            // Use CCSceneResolutionPolicy.Custom as we're manually setting our viewports
            CCScene.SetDefaultDesignResolution(desiredWidth, desiredHeight, CCSceneResolutionPolicy.Custom);
            
            // Determine whether to use the high or low def versions of our images
            // Make sure the default texel to content size ratio is set correctly
            // Of course you're free to have a finer set of image resolutions e.g (ld, hd, super-hd)
            if (desiredWidth < windowSize.Width)
            {
                application.ContentSearchPaths.Add("images/hd");
                CCSprite.DefaultTexelToContentSizeRatio = 2.0f;
            }
            else
            {
                application.ContentSearchPaths.Add("images/ld");
                CCSprite.DefaultTexelToContentSizeRatio = 1.0f;
            }
            
            var topViewport = new CCViewport(new CCRect(0.0f, 0.2f, .5f, 0.6f));
            var bottomViewport = new CCViewport(new CCRect(0.5f, 0.0f, .5f, 1.0f));

            // Each viewport needs its own director
            var sceneDirector1 = new CCDirector();
            var sceneDirector2 = new CCDirector();

            var scene1 = new CCScene(mainWindow, topViewport, sceneDirector1);
            var scene2 = new CCScene(mainWindow, bottomViewport, sceneDirector2);

            var layer1 = new GameLayer();
            var layer2 = new GameLayer();

            scene1.AddChild(layer1);
            scene2.AddChild(layer2);

            sceneDirector1.RunWithScene(scene1);
            sceneDirector2.RunWithScene(scene2);
        }
Exemplo n.º 26
0
		public static CCScene SceneWithScore (CCWindow mainWindow, int score)
		{
			var scene = new CCScene (mainWindow);

			var winSize = mainWindow.WindowSizeInPixels;
			const float wbase = 640.0f;
			const float hbase = 1136.0f;

			var layer = new GameOverLayer (score, winSize.Width / wbase, winSize.Height / hbase);

			scene.AddChild (layer);

			return scene;
		}
Exemplo n.º 27
0
        public static CCScene Scene(CCWindow window)
        {
            var scene = new CCScene(window);

            var camera = new CCCamera(
                             CCCameraProjection.Projection2D, window.DesignResolutionSize * CSF
                         );

            var layer = new TestLayer1();
            layer.Camera = camera;

            scene.AddChild(layer);

            return scene;
        }
Exemplo n.º 28
0
		public override void ApplicationDidFinishLaunching(CCApplication application, CCWindow mainWindow)
		{
			application.ContentRootDirectory = "Content";

			sharedWindow = mainWindow;

			DefaultResolution = new CCSize(
		application.MainWindow.WindowSizeInPixels.Width,
		application.MainWindow.WindowSizeInPixels.Height);

			CCScene scene = new CCScene(sharedWindow);
			CCLayer layer = new IntroLayer(DefaultResolution);

			scene.AddChild(layer);
			sharedWindow.RunWithScene(scene);
		}
Exemplo n.º 29
0
		/// <summary>
		///  Implement CCDirector and CCScene init code here.
		/// </summary>
		/// <returns>
		///  true  Initialize success, app continue.
		///  false Initialize failed, app terminate.
		/// </returns>
		public override void ApplicationDidFinishLaunching(CCApplication application, CCWindow mainWindow)
		{

			preferredWidth = application.MainWindow.WindowSizeInPixels.Width;
			preferredHeight = application.MainWindow.WindowSizeInPixels.Height;

			application.ContentRootDirectory = "Content";
			application.ContentSearchPaths.Add("SD");

			CCScene scene = new CCScene(mainWindow);
			CCLayer layer = new IntroLayer(new CCSize(preferredWidth, preferredHeight));

			scene.AddChild(layer);

			mainWindow.RunWithScene(scene);

		}
Exemplo n.º 30
0
        public override void ApplicationDidFinishLaunching(CCApplication application, CCWindow mainWindow)
        {
            application.ContentRootDirectory = "Content";
            sharedWindow = mainWindow;
            DefaultResolution = new CCSize(
            application.MainWindow.WindowSizeInPixels.Width,
            application.MainWindow.WindowSizeInPixels.Height);

            //mainWindow.SetDesignResolutionSize(960, 640, CCSceneResolutionPolicy.ShowAll);
            //application.HandleMediaStateAutomatically = false;
            //mainWindow.DisplayStats = true;

            CCScene scene = new CCScene(sharedWindow);
            CCLayer layer = new IntroLayer(DefaultResolution);

            scene.AddChild(layer);
            sharedWindow.RunWithScene(scene);
        }