Sync the APIs of HTML5 to the JSB (02)
Sync the APIs of HTML5 to the JSB (02)
Refactor #2802 [Closed]
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset commit:a8f0d691c0105a8d015443a4e241b8bca28d792a.
Status: | Closed | |
---|---|---|
Start date: | 2013-09-12 | |
Priority: | Normal | |
Due date: | ||
Assignee: | ||
% Done: | 100% |
|
Category: | - | |
Target version: | v2.2 |
The API in Cocos2d-html5 is cc.Director.getInstance().getTouchDispatcher().addTargetedDelegate(delegate, priority, swallowsTouches), however, in JSB is cc.registerTargettedDelegate(priority, swallowsTouches, delegate). The API and parameters order are different.
S:add cc.registerTargettedDelegate at html5. Set this api to deprecated :cc.Director.getInstance().getTouchDispatcher().addTargetedDelegate at HTML5.
These APIs:cc.Director.getInstance().getTouchDispatcher().removeDelegate(delegate), cc.Director.getInstance().getTouchDispatcher().registerStandardDelegate(delegate) same as 2
There are not cc.ParticleSystemQuad in JSB, JSB renames cc.ParticleSystemQual to cc.ParticleSystem.
S: Let’s use cc.ParticleSystem() in both h5 and jsb.
jsb cc.SpriteFrameCache doesn’t support json format plist, but h5 does
S: It is not a common requirement. Deprecate it.