示例#1
0
        public void menuCallback(CCObject pSender)
        {
            // get the userdata, it's the index of the menu item clicked
            CCMenuItem pMenuItem = (CCMenuItem)(pSender);
            int nIdx = pMenuItem.zOrder - 10000;

            // create the test scene and run it
            TestScene pScene = CreateTestScene(nIdx);
            if (pScene != null)
            {
                pScene.runThisTest();
            }
        }
示例#2
0
        void MenuCallback(object sender)
        {
            // get the userdata, it's the index of the menu item clicked
            CCMenuItem menuItem = (CCMenuItem)sender;
            var        nIdx     = menuItem.ZOrder - MENU_ITEM_Z_ORDER;

            // create the test scene and run it
            TestScene scene = CreateTestScene(nIdx);

            if (scene != null)
            {
                scene.runThisTest();
            }
        }
示例#3
0
        public void menuCallback(CCMenuItem pSender)
        {
            // get the userdata, it's the index of the menu item clicked
            CCMenuItem pMenuItem = (CCMenuItem)(pSender);
            int        nIdx      = (int)pMenuItem.UserData;

            // create the test scene and run it
            TestScene pScene = CreateTestScene(nIdx);

            if (pScene != null)
            {
                CCApplication.SharedApplication.GamePadDPadUpdate   -= _GamePadDPadDelegate;
                CCApplication.SharedApplication.GamePadButtonUpdate -= _GamePadButtonDelegate;
                pScene.runThisTest();
            }
        }