Custom Action classes

Hi,

As I read from this topic, creating custom actions was not supported at that moment. Is this still the case for 2.0.1?

All I am trying to create a LabelNumberAction which will animate a label (set its string with given number) like start with 10 and count up to 100 in 1 seconds kinda thing. I can do it with scheduling a callback but when I need to add second of that effect, i need to remember the schedule callback so I can unschedule it to prevent erratic behaviour. This mentioned effect (canceling all actions, adding new one) is easily done with actions, but i cannot create custom ones.

Why don’t you just try it? Create your custom Action in the “CocosCreator/resources/engine/cocos2d/actions” folder. Then “register” it in the index.js (same Folder) file. Just one line required("/myaction.js"). your custom action class must inherit from ccAction.

and recompile the engine with “gulp build”. I’m changing a lot. most changes works for me. (I never tries action so far)