cocos2d-js
cocos2d-js copied to clipboard
Is cc.ActionInterval and similar must be extendable in JSB?
Because they are missing in jsb config file.
ActionInterval
cannot be extended in jsb now. For the update
function written in js will not be invoked in c++, unless you make your modification in C++.
Is ActionInterval
should be extendable? I can work with it.
Hmm, I'm not sure. schedule can be an alternative in most cases. @pandamicro How about your opinion?
Hi, @IgorMats, scheduled tasks is our suggest way to have customized actions. The thing is, if we make ActionInterval extendable, we should make other actions extendable also. But we can't add a bunch of script served code into update functions of all actions in Cocos2d-x for now. That's the main limit of JS Bindings and sorry for the inconvenience.
If many people have this requirement, we should consider it. How about add a ExtendableActionInterval
or some thing similar which is a subclass of cocos2d::ActionInterval
written in C++, and can invoke js function. Bind it in JSB, so we can entend it in js.
Good idea, that is an option, and we can save a lot of work with a macro, as all such extended actions should have almost same codes.
@joshuastray Right! I also need dev some action in JS , but i can't extend cc.ActionInterval. @pandamicro Please! support it! Thank and thank you very munch!
any update on this?