cocos2dx 3.x 关于action的回调函数
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文档