TransitionsTest
2024-09-09 08:42:45
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 : return CCTransitionJumpZoom::create(t, s); case : return CCTransitionProgressRadialCCW::create(t, s);
case : return CCTransitionProgressRadialCW::create(t, s);
case : return CCTransitionProgressHorizontal::create(t, s);
case : return CCTransitionProgressVertical::create(t, s);
case : return CCTransitionProgressInOut::create(t, s);
case : return CCTransitionProgressOutIn::create(t, s); case : return CCTransitionCrossFade::create(t,s); case : return PageTransitionForward::create(t, s);
case : return PageTransitionBackward::create(t, s);
case : return CCTransitionFadeTR::create(t, s);
case : return CCTransitionFadeBL::create(t, s);
case : return CCTransitionFadeUp::create(t, s);
case : return CCTransitionFadeDown::create(t, s); case : return CCTransitionTurnOffTiles::create(t, s); case : return CCTransitionSplitRows::create(t, s);
case : return CCTransitionSplitCols::create(t, s); case : return CCTransitionFade::create(t, s);
case : return FadeWhiteTransition::create(t, s); case : return FlipXLeftOver::create(t, s);
case : return FlipXRightOver::create(t, s);
case : return FlipYUpOver::create(t, s);
case : return FlipYDownOver::create(t, s);
case : return FlipAngularLeftOver::create(t, s);
case : return FlipAngularRightOver::create(t, s); case : return ZoomFlipXLeftOver::create(t, s);
case : return ZoomFlipXRightOver::create(t, s);
case : return ZoomFlipYUpOver::create(t, s);
case : return ZoomFlipYDownOver::create(t, s);
case : return ZoomFlipAngularLeftOver::create(t, s);
case : return ZoomFlipAngularRightOver::create(t, s); case : return CCTransitionShrinkGrow::create(t, s);
case : return CCTransitionRotoZoom::create(t, s); case : return CCTransitionMoveInL::create(t, s);
case : return CCTransitionMoveInR::create(t, s);
case : return CCTransitionMoveInT::create(t, s);
case : return CCTransitionMoveInB::create(t, s); case : return CCTransitionSlideInL::create(t, s);
case : return CCTransitionSlideInR::create(t, s);
case : return CCTransitionSlideInT::create(t, s);
case : 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);
}
}
最新文章
- Windows bat脚本学习(1)
- NotePad++中如何出去闪烁的光标?
- ORACLE 9i 数据库体系结构图
- linux命令:文件类型和扩展名
- C++回顾map的用法
- Sharepoint 2013 发布功能(Publishing features)
- 50个常用的JQuery代码
- 变色龙安装程序 Chameleon Install 2.2 svn 2281发布
- 当年的文曲星cc800
- 缓存应用--Memcached分布式缓存简介
- STL 六大组件 功能与运用
- JQuery中的省市联动
- 四大流行的java连接池之BoneCP篇
- fragment android
- paip.jdk1.4 1.5(5.0) 1.6(6.0) 7.0 8.0特点比较与不同
- apt-get 总结
- iOS Storyboard适配问题
- SpringBoot开发案例之打造私有云网盘
- golang json 读写配置文件
- async:false;渲染阻塞