首页 > 其他 > 详细

动作加速度Speed

时间:2015-06-05 22:20:25      阅读:278      评论:0      收藏:0      [点我收藏+]

 动作加速度Speed 

 1     //////////////////  动作加速度Speed   ///////////////
 2 
 3     Sprite* sprite = Sprite::create("button.png");
 4     sprite->setPosition(Vec2(visibleSize.width * 0.2, visibleSize.height * 0.5));
 5     this->addChild(sprite);
 6 
 7     ActionInterval *move = MoveTo::create(4, Vec2(visibleSize.width * 0.8, visibleSize.height * 0.5));
 8 
 9     // 参数( 动作,是原来的 2 倍 )
10     Speed *speed = Speed::create(move, 2);
11 
12     sprite->runAction(speed);
13 
14 
15     //////////////////  动作加速度Speed   ///////////////

执行后动作是原来的 2 倍

动作加速度Speed

原文:http://www.cnblogs.com/dudu580231/p/4555614.html

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