首页 > 其他 > 详细

cocos2dx 3.x 关于action的回调函数

时间:2014-09-30 00:34:42      阅读:347      评论:0      收藏:0      [点我收藏+]
auto bgPic = Sprite :: create( "StartGameBg.jpg" );
             bgPic ->setContentSize ( Size( 800.0f , 1246.0f));
             bgPic ->setPosition ( Vec2( visibleSize .width / 2 , - bgPic -> getContentSize(). height /2 + visibleSize . height));
             this -> addChild( bgPic );

             FiniteTimeAction * moveAction = EaseExponentialInOut:: create (MoveTo :: create( 6.0f , Vec2 (visibleSize . width / 2 ,bgPic -> getContentSize(). height / 2)));
             bgPic ->runAction ( Sequence:: create (
                         moveAction ,
                         CallFunc ::create ( CC_CALLBACK_0( GameStartScene ::buttonLogin , this )),
                         nullptr ));

 

 
在其中, CallFunc 指的是回调函数里面是没有参数的哦
如果说是CallFuncN的话是有一个回调函数的,后面也用的是CC_CALLBACK_1
如果是需要更多的参数请参考API文档

cocos2dx 3.x 关于action的回调函数

原文:http://www.cnblogs.com/seabrea/p/4001132.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!