public override void runThisTest()
        {
            DirectorTest.s_currentOrientation = ccDeviceOrientation.CCDeviceOrientationLandscapeLeft;
            CCLayer pLayer = DirectorTest.nextDirectorTestCase();

            addChild(pLayer);

            CCDirector.sharedDirector().replaceScene(this);
        }
		public static CCLayer CreateLayer(int index)
		{
			CCLayer testLayer = null;

			switch (index)
			{
			case (int) EventDispatchTests.TOUCHABLE_SPRITE_TEST:
				testLayer = new TouchableSpriteTest();
				break;
			case (int) EventDispatchTests.FIXED_PRIORITY_TEST:
				testLayer = new FixedPriorityTest();
				break;
			case (int) EventDispatchTests.EVENT_MOUSE:
				testLayer = new MouseEventTest();
				break;
			case (int) EventDispatchTests.TEST_LABEL_KEYBOARD:
				testLayer = new LabelKeyboardEventTest();
				break;
			case (int) EventDispatchTests.TEST_ACCELEROMETER:
				testLayer = new SpriteAccelerationEventTest();
				break;
			case (int) EventDispatchTests.TEST_CUSTOM_EVENT:
				testLayer = new CustomEventTest();
				break;
			case (int) EventDispatchTests.TEST_REMOVE_RETAIN_NODE:
				testLayer = new RemoveAndRetainNodeTest();
				break;
			case (int) EventDispatchTests.TEST_REMOVE_AFTER_ADDING:
				testLayer = new RemoveListenerAfterAddingTest();
				break;
			case (int) EventDispatchTests.TEST_DIRECTOR:
				testLayer = new DirectorTest();
				break;
			case (int) EventDispatchTests.TEST_GLOBAL_Z_TOUCH:
				testLayer = new GlobalZTouchTest();
				break;
			case (int) EventDispatchTests.TEST_PAUSE_RESUME:
				testLayer = new PauseResumeTest();
				break;
			case (int) EventDispatchTests.TEST_REMOVE_ALL:
				testLayer = new RemoveAllTest();
				break;
			case (int) EventDispatchTests.TEST_SMOOTH_FOLLOW:
				testLayer = new SmoothFollowTest();
				break;
			case (int) EventDispatchTests.TEST_STOP_PROPAGATION:
				testLayer = new StopPropagationTest();
				break;
			default:
				break;
			}

            testLayer.Camera = AppDelegate.SharedCamera;

			return testLayer;
		}
Beispiel #3
0
        public static CCLayer CreateLayer(int index)
        {
            CCLayer testLayer = null;

            switch (index)
            {
            case (int)EventDispatchTests.TOUCHABLE_SPRITE_TEST:
                testLayer = new TouchableSpriteTest();
                break;

            case (int)EventDispatchTests.FIXED_PRIORITY_TEST:
                testLayer = new FixedPriorityTest();
                break;

            case (int)EventDispatchTests.EVENT_MOUSE:
                testLayer = new MouseEventTest();
                break;

            case (int)EventDispatchTests.TEST_LABEL_KEYBOARD:
                testLayer = new LabelKeyboardEventTest();
                break;

            case (int)EventDispatchTests.TEST_ACCELEROMETER:
                testLayer = new SpriteAccelerationEventTest();
                break;

            case (int)EventDispatchTests.TEST_CUSTOM_EVENT:
                testLayer = new CustomEventTest();
                break;

            case (int)EventDispatchTests.TEST_REMOVE_RETAIN_NODE:
                testLayer = new RemoveAndRetainNodeTest();
                break;

            case (int)EventDispatchTests.TEST_REMOVE_AFTER_ADDING:
                testLayer = new RemoveListenerAfterAddingTest();
                break;

            case (int)EventDispatchTests.TEST_DIRECTOR:
                testLayer = new DirectorTest();
                break;

            case (int)EventDispatchTests.TEST_GLOBAL_Z_TOUCH:
                testLayer = new GlobalZTouchTest();
                break;

            case (int)EventDispatchTests.TEST_PAUSE_RESUME:
                testLayer = new PauseResumeTest();
                break;

            case (int)EventDispatchTests.TEST_REMOVE_ALL:
                testLayer = new RemoveAllTest();
                break;

            case (int)EventDispatchTests.TEST_SMOOTH_FOLLOW:
                testLayer = new SmoothFollowTest();
                break;

            case (int)EventDispatchTests.TEST_STOP_PROPAGATION:
                testLayer = new StopPropagationTest();
                break;

            default:
                break;
            }

            return(testLayer);
        }