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
这是什么原因呢?
设定是平移父面板的高度,但实际发现平移的距离小于这个高度值