Exemplo n.º 1
0
void DifficultyScene::runThisTest()
{
	CCLayer *pLayer = new DifficultyLayer();
	pLayer->autorelease();
	addChild(pLayer);
	CCDirector::sharedDirector()->replaceScene(CCTransitionSlideInT::create(0.5f, this));
}
Exemplo n.º 2
0
CCLayer* restartZwoptexTest()
{
    CCLayer* pLayer = createZwoptexLayer(sceneIdx);
    pLayer->autorelease();

    return pLayer;
} 
Exemplo n.º 3
0
CCLayer* restartAction()
{
    CCLayer* pLayer = createLayer(sceneIdx);
    pLayer->autorelease();

    return pLayer;
} 
bool AppDelegate::applicationDidFinishLaunching()
{
    // initialize director
    CCDirector *pDirector = CCDirector::sharedDirector();
    pDirector->setOpenGLView(CCEGLView::sharedOpenGLView());

    CCSize screenSize = CCEGLView::sharedOpenGLView()->getFrameSize();
    
    CCSize designSize = CCSizeMake(480, 320);
    
    if (screenSize.height > 320)
    {
        CCSize resourceSize = CCSizeMake(960, 640);
        CCFileUtils::sharedFileUtils()->setResourceDirectory("hd");
        pDirector->setContentScaleFactor(resourceSize.height/designSize.height);
    }
    
    CCEGLView::sharedOpenGLView()->setDesignResolutionSize(designSize.width, designSize.height, kResolutionNoBorder);

    // turn on display FPS
    pDirector->setDisplayStats(true);

    // set FPS. the default value is 1.0/60 if you don't call this
    pDirector->setAnimationInterval(1.0 / 60);

    CCScene * pScene = CCScene::create();
    CCLayer * pLayer = new TestController();
    pLayer->autorelease();

    pScene->addChild(pLayer);
    pDirector->runWithScene(pScene);

    return true;
}
Exemplo n.º 5
0
bool AppDelegate::applicationDidFinishLaunching()
{
	// initialize director
	CCDirector *pDirector = CCDirector::sharedDirector();


	pDirector->setOpenGLView(&CCEGLView::sharedOpenGLView());

	// turn on display FPS
	//pDirector->setDisplayFPS(false);
	
	pDirector->setDeviceOrientation(CCDeviceOrientationLandscapeLeft);
	// set FPS. the default value is 1.0/60 if you don't call this
	//pDirector->setAnimationInterval(1.0 / 60);

//    CCEGLView::sharedOpenGLView()->setDesignResolutionSize(designSize.width, designSize.height, kResolutionNoBorder);

    // turn on display FPS
 //   pDirector->setDisplayStats(true);

    // set FPS. the default value is 1.0/60 if you don't call this
    //pDirector->setAnimationInterval(1.0 / 60);

	// create a scene. it's an autorelease object
    CCScene * pScene = CCScene::create();
    CCLayer * pLayer = new TestController();
	pLayer->autorelease();
    pScene->addChild(pLayer);
    pDirector->runWithScene(pScene);
	//pDirector->runWithScene(HelloWorld::scene());

	return true;

}
Exemplo n.º 6
0
bool AppDelegate::applicationDidFinishLaunching()
{
	// initialize director
	CCDirector *pDirector = CCDirector::sharedDirector();


	pDirector->setOpenGLView(&CCEGLView::sharedOpenGLView());

	// turn on display FPS
	//pDirector->setDisplayFPS(false);

	pDirector->setDeviceOrientation(CCDeviceOrientationLandscapeLeft);
	// set FPS. the default value is 1.0/60 if you don't call this
	//pDirector->setAnimationInterval(1.0 / 60);

    CCScene * pScene = CCScene::node();
    CCLayer * pLayer = new TestController();
    pLayer->autorelease();
	pScene->addChild(pLayer);

	// run
	pDirector->runWithScene(pScene);


	return true;

}
Exemplo n.º 7
0
static CCLayer* restartAction()
{
    CCLayer* pLayer = (createFunctions[sceneIdx])();
    pLayer->autorelease();
    
    return pLayer;
}
Exemplo n.º 8
0
CCLayer* RestartTest()
{
	CCLayer* pLayer = CreateLayer(s_nActionIdx);
	pLayer->autorelease();

	return pLayer;
}
CCLayer* restartTestCase()
{
    CCLayer* pLayer = createTestCase(sceneIdx);
    pLayer->autorelease();

    return pLayer;
}
Exemplo n.º 10
0
CCLayer* restartParallaxAction()
{
    CCLayer* pLayer = createParallaxTestLayer(sceneIdx);
    pLayer->autorelease();

    return pLayer;
} 
Exemplo n.º 11
0
CCLayer* createSchedulerTest(int nIndex)
{
    CCLayer* pLayer = NULL;

    switch (nIndex)
    {
    case 0:
        pLayer = new SchedulerAutoremove(); break;
    case 1:
        pLayer = new SchedulerPauseResume(); break;
    case 2:
        pLayer = new SchedulerUnscheduleAll(); break;
    case 3:
        pLayer = new SchedulerUnscheduleAllHard(); break;
    case 4:
        pLayer = new SchedulerSchedulesAndRemove(); break;
    case 5:
        pLayer = new SchedulerUpdate(); break;
    case 6:
        pLayer = new SchedulerUpdateAndCustom(); break;
    case 7:
        pLayer = new SchedulerUpdateFromCustom(); break;
    default:
        break;
    }
    pLayer->autorelease();

    return pLayer;
}
Exemplo n.º 12
0
CCLayer* restartEffectAdvanceAction()
{
	CCLayer* pLayer = createEffectAdvanceLayer(sceneIdx);
	pLayer->autorelease();

	return pLayer;
} 
Exemplo n.º 13
0
CCLayer *Restart()
{
    CCLayer *pLayer = createTests(s_nIdx);
    pLayer->autorelease();

    return pLayer;
}
bool AppDelegate::applicationDidFinishLaunching()
{
    // initialize director
    CCDirector *pDirector = CCDirector::sharedDirector();
    pDirector->setOpenGLView(&CCEGLView::sharedOpenGLView());

    // enable High Resource Mode(2x, such as iphone4) and maintains low resource on other devices.
    // pDirector->enableRetinaDisplay(true);

    // sets opengl landscape mode
    // tests set device orientation in RootViewController.mm
    // pDirector->setDeviceOrientation(kCCDeviceOrientationLandscapeLeft);

	// turn on display FPS
    pDirector->setDisplayFPS(true);

	// set FPS. the default value is 1.0/60 if you don't call this
	pDirector->setAnimationInterval(1.0 / 60);

    CCScene * pScene = CCScene::node();
    CCLayer * pLayer = new TestController();
    pLayer->autorelease();
	pScene->addChild(pLayer);

	//pDirector->runWithScene(HelloWorld::scene());
	pDirector->runWithScene(pScene);

    return true;
}
Exemplo n.º 15
0
static CCLayer* restartAction(void)
{
    CCLayer* pLayer = createShaderLayer(sceneIdx);
    pLayer->autorelease();

    return pLayer;
}
Exemplo n.º 16
0
CCLayer* restartSchedulerTest()
{
    CCLayer* pLayer = (createFunctions[sceneIdx])();
    pLayer->init();
    pLayer->autorelease();

    return pLayer;
}
Exemplo n.º 17
0
void DataVisitorTestScene::runThisTest()
{
    CCLayer *layer = new PrettyPrinterDemo();
    layer->autorelease();
    addChild(layer);

    CCDirector::sharedDirector()->replaceScene(this);
}
Exemplo n.º 18
0
void ClickAndMoveTestScene::runThisTest()
{
    CCLayer* pLayer = new MainLayer();
    pLayer->autorelease();

    addChild(pLayer);
    CCDirector::sharedDirector()->replaceScene(this);
}
Exemplo n.º 19
0
TestScene::TestScene()
{
    CCScene::init();
    CCLayer* pLayer = new BackToMainMenuLayer();
    pLayer->autorelease();

    addChild(pLayer, 1000);
}
Exemplo n.º 20
0
void TestScene::MainMenuCallback(CCObject* pSender)
{
    CCScene* pScene = CCScene::node();
    CCLayer* pLayer = new TestController();
    pLayer->autorelease();
    pScene->addChild(pLayer);
    CCDirector::sharedDirector()->replaceScene(pScene);
}
Exemplo n.º 21
0
CCScene* GameScene::scene()
{
    CCScene* scene = CCScene::create();
    CCLayer* layer = new GameScene();
    layer->autorelease();
    scene->addChild(layer);
    return scene;
}
Exemplo n.º 22
0
void CocosDenshionTestScene::runThisTest()
{
    CCLayer* pLayer = new CocosDenshionTest();
    addChild(pLayer);
    pLayer->autorelease();

    CCDirector::sharedDirector()->replaceScene(this);
}
void TextureAtlasEncryptionTestScene::runThisTest()
{
    CCLayer *layer = new TextureAtlasEncryptionDemo;
    layer->autorelease();
    
    addChild(layer);
    
    CCDirector::sharedDirector()->replaceScene(this);
}
Exemplo n.º 24
0
void GameMenuScene::runThisScene()
{
	CCLayer* pLayer = new GameMenuLayer();
	pLayer->init();
	pLayer->autorelease();
	addChild(pLayer);

	CCDirector::sharedDirector()->replaceScene(this);
}
Exemplo n.º 25
0
CCLayer* NextTest()
{
	++s_nActionIdx;
	s_nActionIdx = s_nActionIdx % TEST_LAYER_COUNT;

	CCLayer* pLayer = CreateLayer(s_nActionIdx);
	pLayer->autorelease();

	return pLayer;
}
Exemplo n.º 26
0
CCLayer* nextAction()
{
    sceneIdx++;
    sceneIdx = sceneIdx % MAX_LAYER;

    CCLayer* pLayer = createLayer(sceneIdx);
    pLayer->autorelease();

    return pLayer;
}
Exemplo n.º 27
0
CCLayer *Next()
{
    ++s_nIdx;
    s_nIdx = s_nIdx % TEST_SCENEEDITOR_COUNT;

    CCLayer *pLayer = createTests(s_nIdx);
    pLayer->autorelease();

    return pLayer;
}
Exemplo n.º 28
0
CCLayer* nextZwoptexTest()
{
    sceneIdx++;
    sceneIdx = sceneIdx % MAX_LAYER;

    CCLayer* pLayer = createZwoptexLayer(sceneIdx);
    pLayer->autorelease();

    return pLayer;
}
CCLayer* nextTestCase()
{
    sceneIdx++;
    sceneIdx = sceneIdx % MAX_LAYER;

    CCLayer* pLayer = createTestCase(sceneIdx);
    pLayer->autorelease();

    return pLayer;
}
Exemplo n.º 30
0
static CCLayer* nextAction(void)
{
    sceneIdx++;
    sceneIdx = sceneIdx % MAX_LAYER;

    CCLayer* pLayer = createShaderLayer(sceneIdx);
    pLayer->autorelease();

    return pLayer;
}