Exemplo n.º 1
0
        public static TestScene CreateTestScene(int index)
        {
            //Application.PurgeAllCachedData();

            TestScene scene = null;

            switch(index)
            {
                case (int)TestCases.TEST_ACTIONS:
                    scene = new ActionsTestScene(); break;
                case (int)TestCases.TEST_TRANSITIONS:
                    scene = new TransitionsTestScene(); break;
                case (int)TestCases.TEST_PROGRESS_ACTIONS:
                    scene = new ProgressActionsTestScene(); break;
                case (int)TestCases.TEST_EFFECTS:
                    scene = new EffectTestScene(); break;
                case (int)TestCases.TEST_CLICK_AND_MOVE:
                    scene = new ClickAndMoveTest(); break;
                case (int)TestCases.TEST_ROTATE_WORLD:
                    scene = new RotateWorldTestScene(); break;
                case (int)TestCases.TEST_PARTICLE:
                    scene = new ParticleTestScene(); break;
                case (int)TestCases.TEST_EASE_ACTIONS:
                    scene = new EaseActionsTestScene(); break;
                case (int)TestCases.TEST_MOTION_STREAK:
                    scene = new MotionStreakTestScene(); break;
                case (int)TestCases.TEST_DRAW_PRIMITIVES:
                    scene = new DrawPrimitivesTestScene(); break;
                case (int)TestCases.TEST_COCOSNODE:
                    scene = new CocosNodeTestScene(); break;
                case (int)TestCases.TEST_TOUCHES:
                    scene = new PongScene(); break;
                case (int)TestCases.TEST_MENU:
                    scene = new MenuTestScene(); break;
                case (int)TestCases.TEST_ACTION_MANAGER:
                    scene = new ActionManagerTestScene(); break;
                case (int)TestCases.TEST_LAYER:
                    scene = new LayerTestScene(); break;
                case (int)TestCases.TEST_SCENE:
                    scene = new SceneTestScene(); break;
                case (int)TestCases.TEST_PARALLAX:
                    scene = new ParallaxTestScene(); break;
                case (int)TestCases.TEST_TILE_MAP:
                    scene = new TileMapTestScene(); break;
                case (int)TestCases.TEST_INTERVAL:
                    scene = new IntervalTestScene(); break;
                case (int)TestCases.TEST_LABEL:
                    scene = new AtlasTestScene(); break;
                case (int)TestCases.TEST_TEXT_INPUT:
                    scene = new TextInputTestScene(); break;
                case (int)TestCases.TEST_SPRITE:
                    scene = new SpriteTestScene(); break;
                case (int)TestCases.TEST_SCHEDULER:
                    scene = new SchedulerTestScene(); break;
                case (int)TestCases.TEST_RENDERTEXTURE:
                    scene = new RenderTextureScene(); break;
                case (int)TestCases.TEST_TEXTURE2D:
                    scene = new TextureTestScene(); break;
                case (int)TestCases.TEST_BOX2D:
                    scene = new Box2DTestScene(); break;
                case (int)TestCases.TEST_BOX2DBED2:
                    scene = new Box2D.TestBed.Box2dTestBedScene(); break;
                case (int)TestCases.TEST_EFFECT_ADVANCE:
                    scene = new EffectAdvanceScene(); break;
                case (int)TestCases.TEST_ACCELEROMRTER:
                    scene = new AccelerometerTestScene(); break;
                case (int)TestCases.TEST_COCOSDENSHION:
                    scene = new CocosDenshionTestScene(); break;
                case (int)TestCases.TEST_PERFORMANCE:
                    scene = new PerformanceTestScene(); break;
                case (int)TestCases.TEST_ZWOPTEX:
                    scene = new ZwoptexTestScene(); break;
                case (int)TestCases.TEST_FONTS:
                    scene = new FontTestScene(); break;
                    #if IPHONE || IOS || MACOS || WINDOWSGL || WINDOWS || (ANDROID && !OUYA) || NETFX_CORE
                case (int)TestCases.TEST_SYSTEM_FONTS:
                    scene = new SystemFontTestScene(); break;
                    #endif
                case (int)TestCases.TEST_CLIPPINGNODE:
                    scene = new ClippingNodeTestScene();
                    break;

                case (int)TestCases.TEST_EXTENSIONS:
                    scene = new ExtensionsTestScene();
                    break;
                case (int)TestCases.TEST_ORIENTATION:
                    scene = new OrientationTestScene();
                    break;
                case(int)TestCases.TEST_MULTITOUCH:
                    scene = new MultiTouchTestScene();
                    break;
                case(int)TestCases.TEST_EVENTDISPATCHER:
                    scene = new EventDispatcherTestScene();
                    break;
                    #if USE_PHYSICS
                case(int)TestCases.TEST_PHYSICS:
                    scene = new PhysicsTestScene();
                    break;
                    #endif
                default:
                    break;
            }

            return scene;
        }
Exemplo n.º 2
0
        public override void BackCallback(object sender)
        {

            CCScene s = new PhysicsTestScene();
            s.AddChild(PhysicsTestScene.BackAction ());

            Director.ReplaceScene(s);
        }