New issue
 Projects > js > Issues > Refactor #2802

Sync the APIs of HTML5 to the JSB (02)

Refactor #2802 [Closed]
ludingping 2013-09-12 02:08 . Updated about 10 years ago
  1. 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

  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.

  3. jsb cc.SpriteFrameCache doesn’t support json format plist, but h5 does
    S: It is not a common requirement. Deprecate it.

ludingping 2013-09-13 07:32
  • Status changed from New to Closed
  • % Done changed from 0 to 100

Applied in changeset commit:a8f0d691c0105a8d015443a4e241b8bca28d792a.

Atom PDF

Status:Closed
Start date:2013-09-12
Priority:Normal
Due date:
Assignee:ludingping
% Done:

100%

Category:-
Target version:v2.2