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);
}
}

最新文章

  1. Windows bat脚本学习(1)
  2. NotePad++中如何出去闪烁的光标?
  3. ORACLE 9i 数据库体系结构图
  4. linux命令:文件类型和扩展名
  5. C++回顾map的用法
  6. Sharepoint 2013 发布功能(Publishing features)
  7. 50个常用的JQuery代码
  8. 变色龙安装程序 Chameleon Install 2.2 svn 2281发布
  9. 当年的文曲星cc800
  10. 缓存应用--Memcached分布式缓存简介
  11. STL 六大组件 功能与运用
  12. JQuery中的省市联动
  13. 四大流行的java连接池之BoneCP篇
  14. fragment android
  15. paip.jdk1.4 1.5(5.0) 1.6(6.0) 7.0 8.0特点比较与不同
  16. apt-get 总结
  17. iOS Storyboard适配问题
  18. SpringBoot开发案例之打造私有云网盘
  19. golang json 读写配置文件
  20. async:false;渲染阻塞

热门文章

  1. wepy - 与原生有什么不同(slot插槽)
  2. 微信小程序 - 上拉加载下拉刷新
  3. Java从零开始学十四(包和访问控制)
  4. JSP实现数据传递(web基础学习笔记三)
  5. C语言的角落——C之很常使用特性(一)
  6. java指令备忘
  7. SSO之CAS + LDAP
  8. OpenWrt中对USB文件系统的操作, 以及读写性能测试
  9. 【LeetCode】19. Remove Nth Node From End of List (2 solutions)
  10. Android开发:轻松实现图片倒影效果