码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2014-09-30 00:53:31      阅读:236      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   io   os   ar   sp   div   art   

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的回调函数

标签:style   blog   color   io   os   ar   sp   div   art   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!