• TransitionsTest


    CCTransitionScene* createTransition(int nIndex, float t, CCScene* s)
    {
        // fix bug #486, without setDepthTest(false), FlipX,Y will flickers
        CCDirector::sharedDirector()->setDepthTest(false);
    
        switch(nIndex)
        {
        case 0: return CCTransitionJumpZoom::create(t, s);
    
        case 1: return CCTransitionProgressRadialCCW::create(t, s);
        case 2: return CCTransitionProgressRadialCW::create(t, s);
        case 3: return CCTransitionProgressHorizontal::create(t, s);
        case 4: return CCTransitionProgressVertical::create(t, s);
        case 5: return CCTransitionProgressInOut::create(t, s);
        case 6: return CCTransitionProgressOutIn::create(t, s);
    
        case 7: return CCTransitionCrossFade::create(t,s);
    
        case 8: return PageTransitionForward::create(t, s);
        case 9: return PageTransitionBackward::create(t, s);
        case 10: return CCTransitionFadeTR::create(t, s);
        case 11: return CCTransitionFadeBL::create(t, s);
        case 12: return CCTransitionFadeUp::create(t, s);
        case 13: return CCTransitionFadeDown::create(t, s);
    
        case 14: return CCTransitionTurnOffTiles::create(t, s);
    
        case 15: return CCTransitionSplitRows::create(t, s);
        case 16: return CCTransitionSplitCols::create(t, s);
    
        case 17: return CCTransitionFade::create(t, s);
        case 18: return FadeWhiteTransition::create(t, s);
    
        case 19: return FlipXLeftOver::create(t, s);
        case 20: return FlipXRightOver::create(t, s);
        case 21: return FlipYUpOver::create(t, s);
        case 22: return FlipYDownOver::create(t, s);
        case 23: return FlipAngularLeftOver::create(t, s);
        case 24: return FlipAngularRightOver::create(t, s);
    
        case 25: return ZoomFlipXLeftOver::create(t, s);
        case 26: return ZoomFlipXRightOver::create(t, s);
        case 27: return ZoomFlipYUpOver::create(t, s);
        case 28: return ZoomFlipYDownOver::create(t, s);
        case 29: return ZoomFlipAngularLeftOver::create(t, s);
        case 30: return ZoomFlipAngularRightOver::create(t, s);
    
        case 31: return CCTransitionShrinkGrow::create(t, s);
        case 32: return CCTransitionRotoZoom::create(t, s);
    
        case 33: return CCTransitionMoveInL::create(t, s);
        case 34: return CCTransitionMoveInR::create(t, s);
        case 35: return CCTransitionMoveInT::create(t, s);
        case 36: return CCTransitionMoveInB::create(t, s);
    
        case 37: return CCTransitionSlideInL::create(t, s);
        case 38: return CCTransitionSlideInR::create(t, s);
        case 39: return CCTransitionSlideInT::create(t, s);
        case 40: return CCTransitionSlideInB::create(t, s);
    
        default: break;
        }
    
        return NULL;
    }          
    //调用
    void TestLayer1::restartCallback(CCObject* pSender)
    {
    //TransitionsTestScene是CCScene的子类
        CCScene* s = new TransitionsTestScene();
    
        CCLayer* pLayer = new TestLayer2();
        s->addChild(pLayer);
    //这里是使用
        CCScene* pScene = createTransition(s_nSceneIdx, TRANSITION_DURATION, s);
        s->release();
        pLayer->release();
        if (pScene)
        {
            CCDirector::sharedDirector()->replaceScene(pScene);
        }    
    }
  • 相关阅读:
    XAML实例教程系列 依赖属性和附加属性
    分享Silverlight/Windows8/WPF/WP7/HTML5周学习导读(6月4日6月10日)
    QT GUI基本布局
    mqtt client libraries for c
    QT sqlite相关操作
    navicat 激活工具激活时必须断网 ,如果没有断网激活 激活过程中报如下错误 请卸载navicat 重新安装再行激活操作
    vmware 16 windows7企业版 tools安装不了 驱动签名验证
    虚拟机复制
    Install systemtap on Ubuntu 12.04
    DevOps的各个阶段
  • 原文地址:https://www.cnblogs.com/newlist/p/3205515.html
Copyright © 2020-2023  润新知