首页 新闻 会员 周边

cocos2dx:动作的平移距离小于设定值

0
悬赏园豆:5 [已关闭问题] 关闭于 2015-12-21 10:00
1 DelayTime* delay = DelayTime::create(0.05f);
2 MoveTo* MainMenuMovein = MoveTo::create(0.1f, Vec2(0.0f, p_clipping_panel->getContentSize().height));
3 ActionInterval* MainMenuExponentailIn = EaseExponentialIn::create(MainMenuMovein);
4 Sequence* action_sequence = Sequence::create(delay, MainMenuExponentailIn, NULL);
5 //p_menu_panel是p_clipping_panel的子面板
6 p_menu_panel->runAction(action_sequence);

我让一个子面板执行一个用0.1秒竖直平移到它的父面板上面的动作,打印日志发现父面板的高度是153,但是子面板的position.y= 152.847000

这是什么原因呢?

问题补充:

设定是平移父面板的高度,但实际发现平移的距离小于这个高度值

%NP%的主页 %NP% | 初学一级 | 园豆:196
提问于:2015-12-10 11:12
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册