Esempio n. 1
0
        public static CCScene Scene(CCWindow window)
        {
            var scene = new CCScene(window);

            var layer = new TestLayer1();

            scene.AddChild(layer);

            return(scene);
        }
Esempio n. 2
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;
        }
        public override void ApplicationDidFinishLaunching(CCApplication application, CCWindow mainWindow)
        {
            application.PreferMultiSampling  = false;
            application.ContentRootDirectory = "Content";

            mainWindow.SupportedDisplayOrientations = CCDisplayOrientation.Portrait;
            mainWindow.SetDesignResolutionSize(320, 480, CCSceneResolutionPolicy.ShowAll);

            CCSprite.DefaultTextureToContentScale = 1 / ContentScaleFactor;
            if (ContentScaleFactor > 1)
            {
                application.ContentSearchPaths.Add("hd");
            }
            else
            {
                application.ContentSearchPaths.Add("ld");
            }

            CCSpriteFrameCache.SharedSpriteFrameCache.AddSpriteFrames("sprites.plist");

            CCScene scene = TestLayer1.Scene(mainWindow);

            mainWindow.RunWithScene(scene);
        }