Using CCEaseOut together with CCSequence?

无人久伴 提交于 2019-12-12 03:10:08

问题


I want my action have an effect ease in / ease out, but I already have CCSequence. If I put CCEaseOut in front of my code, movement become weird. Is it possible to make CCEaseOut/CCEaseIn with CCSequence ? Here is my code :

[player runAction:[CCSequence actions:[CCDelayTime actionWithDuration:1],
                            [CCFadeTo actionWithDuration:2 opacity:255],
                            [CCDelayTime actionWithDuration:1],
                            [CCFadeTo actionWithDuration:7 opacity:0],nil]]; 

Thanks in advance


回答1:


You can use CCEase* with most actions but not the CCSequence action directly. You can however wrap one of the actions inside the sequence into a CCEase* action.



来源:https://stackoverflow.com/questions/9273061/using-cceaseout-together-with-ccsequence

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!