当前位置: 首页>>代码示例>>C++>>正文


C++ TestScene::runThisTest方法代码示例

本文整理汇总了C++中TestScene::runThisTest方法的典型用法代码示例。如果您正苦于以下问题:C++ TestScene::runThisTest方法的具体用法?C++ TestScene::runThisTest怎么用?C++ TestScene::runThisTest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TestScene的用法示例。


在下文中一共展示了TestScene::runThisTest方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: menuCallback

void ExtensionsMainLayer::menuCallback(CCObject* pSender)
{
    CCMenuItemFont* pItem = (CCMenuItemFont*)pSender;
    int nIndex = pItem->getZOrder() - kItemTagBasic;

    switch (nIndex)
    {
#if (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)	// MARMALADE CHANGE: Not yet avaiable on Marmalade
    case TEST_NOTIFICATIONCENTER:
        {
            runNotificationCenterTest();
        }
        break;
#endif
    case TEST_CCCONTROLBUTTON:
        {
            CCControlSceneManager* pManager = CCControlSceneManager::sharedControlSceneManager();
            CCScene* pScene = pManager->currentControlScene();
            CCDirector::sharedDirector()->replaceScene(pScene);
        }
        break;
#if (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)	// MARMALADE CHANGE: Not yet avaiable on Marmalade
    case TEST_COCOSBUILDER:
        {
            TestScene* pScene = new CocosBuilderTestScene();
            if (pScene)
            {
                pScene->runThisTest();
                pScene->release();
            }
        }
        break;
#endif
#if (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)	// MARMALADE CHANGE: Not yet avaiable on Marmalade
    case TEST_HTTPCLIENT:
        {
            runHttpClientTest();
        }
        break;
#endif
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
    case TEST_EDITBOX:
        {
            runEditBoxTest();
        }
        break;
#endif
	case TEST_TABLEVIEW:
		{
			runTableViewTest();
		}
		break;
    default:
        break;
    }
}
开发者ID:PavolSatala,项目名称:cocos2d-x,代码行数:56,代码来源:ExtensionsTest.cpp

示例2: menuCallback

void TestController::menuCallback(Object * pSender)
{

	Director::sharedDirector()->purgeCachedData();

    // get the userdata, it's the index of the menu item clicked
    MenuItem* pMenuItem = (MenuItem *)(pSender);
    int idx = pMenuItem->getZOrder() - 10000;

    // create the test scene and run it
    TestScene* pScene = g_aTestNames[idx].callback();

    if (pScene)
    {
        pScene->runThisTest();
        pScene->release();
    }
}
开发者ID:bassarisse,项目名称:LostInCaves,代码行数:18,代码来源:controller.cpp

示例3: menuCallback

void ExtensionsMainLayer::menuCallback(CCObject* pSender)
{
    CCMenuItemFont* pItem = (CCMenuItemFont*)pSender;
    int nIndex = pItem->getZOrder() - kItemTagBasic;

    switch (nIndex)
    {
    case TEST_NOTIFICATIONCENTER:
        {
            runNotificationCenterTest();
        }
        break;
    case TEST_CCCONTROLBUTTON:
        {
            CCControlSceneManager* pManager = CCControlSceneManager::sharedControlSceneManager();
            CCScene* pScene = pManager->currentControlScene();
            CCDirector::sharedDirector()->replaceScene(pScene);
        }
        break;
    case TEST_TEXTUREWATCHER:
        {
            static bool s_bOpened = false;
            s_bOpened = !s_bOpened;
            CCTextureWatcher::sharedTextureWatcher()->setDisplayWatcher(s_bOpened);
        }
        break;
    case TEST_COCOSBUILDER:
        {
            TestScene* pScene = new CocosBuilderTestScene();
            if (pScene)
            {
                pScene->runThisTest();
                pScene->release();
            }
        }
        break;
    default:
        break;
    }
}
开发者ID:haiweizhang,项目名称:MyCocos2d-xV2.0,代码行数:40,代码来源:ExtensionsTest.cpp

示例4: menuCallback

void ExtensionsMainLayer::menuCallback(CCObject* pSender)
{
    CCMenuItemFont* pItem = (CCMenuItemFont*)pSender;
    int nIndex = pItem->getZOrder() - kItemTagBasic;

    switch (nIndex)
    {
#if (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)	// MARMALADE CHANGE: Not yet avaiable on Marmalade
    case TEST_NOTIFICATIONCENTER:
        {
            runNotificationCenterTest();
        }
        break;
#endif
    case TEST_CCCONTROLBUTTON:
        {
            CCControlSceneManager* pManager = CCControlSceneManager::sharedControlSceneManager();
            CCScene* pScene = pManager->currentControlScene();
            CCDirector::sharedDirector()->replaceScene(pScene);
        }
        break;
    case TEST_COCOSBUILDER:
        {
            TestScene* pScene = new CocosBuilderTestScene();
            if (pScene)
            {
                pScene->runThisTest();
                pScene->release();
            }
        }
        break;
#if (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE && CC_TARGET_PLATFORM != CC_PLATFORM_NACL && CC_TARGET_PLATFORM != CC_PLATFORM_EMSCRIPTEN && CC_TARGET_PLATFORM != CC_PLATFORM_WINRT)
    case TEST_HTTPCLIENT:
        {
            runHttpClientTest();
        }
        break;
#endif
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)  || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8)
        case TEST_WEBSOCKET:
        {
            runWebSocketTest();
        }
        break;
#endif
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN)  || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
    case TEST_EDITBOX:
        {
            runEditBoxTest();
        }
        break;
#endif
	case TEST_TABLEVIEW:
		{
			runTableViewTest();
		}
		break;
    case TEST_COMPONENTS:
        {
            runComponentsTestLayerTest();
        }
        break;
	case TEST_ARMATURE:
		{
			ArmatureTestScene *pScene = new ArmatureTestScene();
			if (pScene)
			{
				pScene->runThisTest();
				pScene->release();
			}
		}
		break;
    case TEST_SCENEEDITOR:
       {
            SceneEditorTestScene *pScene = new SceneEditorTestScene();
            if (NULL != pScene)
            {
                pScene->runThisTest();
                pScene->release();
            }
       }
            break;
        case TEST_COCOSGUI:
        {
            CocoStudioGUITestScene* pScene = new CocoStudioGUITestScene();
            pScene->runThisTest();
            pScene->release();
		}
            break;
        case TEST_ACTIONTIMELINE:
            {
                TimelineTestScene* pScene = new TimelineTestScene();
                pScene->runThisTest();
                pScene->release();
            }
    default:
        break;
    }
}
开发者ID:bunny1985,项目名称:DigitAdventures,代码行数:99,代码来源:ExtensionsTest.cpp


注:本文中的TestScene::runThisTest方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。