I wanna develop a gauge animation feature using LayerColor.
How can I run action to LayerColor’s contentSize width or height value?
Is it possible?
I wanna develop a gauge animation feature using LayerColor.
How can I run action to LayerColor’s contentSize width or height value?
Is it possible?
You might consider using one of the ui widgets instead if you’re going to be using it in a GUI of any kind. Layout can be set to a solid color or scale9sprite is nice if a solid bar is not what you want.
Do you mean you wan’t a callback when the size changes? When resizing you wont be waiting for anything to happen so the easiest thing to do is to call what would be your callback right after setContentSize.
Why not a Sequence or a Spawn depending upon what OP wants to happen?
yes that is a better suggestion.
@standwally check out the wiki page on actions http://www.cocos2d-x.org/wiki/Actions
In my other post I assumed you were just setting the size with setContentSize when what you proably really want is to use a ScaleTo action.