1.精灵的runAction方法

     spt = Sprite::create("pean.jpg");
this->addChild(spt); MenuItemFont *item = MenuItemFont::create("开始", [&](Ref* spen){
ToggleVisibility *visi = ToggleVisibility::create();
spt->runAction(visi);
});
Menu *menu = Menu::create(item, NULL);
menu->setPosition(, );
this->addChild(menu);

2.FadeTo方法

 FadeTo *fade = FadeTo::create(2.0, );
spt->runAction(fade);

3.MoveTo方法

 MoveTo *move = MoveTo::create(, ccp(,));
spt->runAction(move);

4.MoveBy方法(x/y轴偏移量)

 MoveBy *move = MoveBy::create(2.0, Vec2(, ));
spt->runAction(move);

5.JumpBy

第一个参数:跳跃总时间

第二个参数:跳跃后的偏移位置

第三个参数:跳跃的高度

第四个参数:跳跃的次数

 JumpBy *by = JumpBy::create(2.0, Vec2(,), , );
spt->runAction(by);

6.CardinalSplineBy(按轨迹移动)

貌似 CardinalSplineBy 和CardinalSplineTo一样,用的是点不是偏移量

PointArray *pa = PointArray::create();
pa->addControlPoint(Vec2(,));
pa->addControlPoint(Vec2(,));
pa->addControlPoint(Vec2(,));
pa->addControlPoint(Vec2(,));
CardinalSplineBy *sb = CardinalSplineBy::create(5.0, pa, );
spt->runAction(sb);
05-11 14:03