Skip to content

Commit f5633cf

Browse files
committed
Merge pull request #1404 from pandamicro/develop
Fix cocos studio parser issues
2 parents d0da3e0 + f3d009d commit f5633cf

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

frameworks/js-bindings/bindings/manual/cocostudio/jsb_cocos2dx_studio_conversions.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ bool jsval_to_animationInfo(JSContext* cx, jsval vp, cocostudio::timeline::Anima
5959

6060
JSB_PRECONDITION3(ok, cx, false, "Error processing arguments");
6161

62+
ret->name = name;
6263
ret->startIndex = (int)startIndex;
6364
ret->endIndex = (int)endIndex;
6465
return true;

frameworks/js-bindings/bindings/script/studio/jsb_cocos2d_studio.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ ccs.InnerActionType = {
4444
SingleFrame: 2
4545
};
4646

47+
ccs.AnimationInfo = function (name, startIndex, endIndex) {
48+
this.name = name || "";
49+
this.startIndex = startIndex != undefined ? startIndex : 0;
50+
this.endIndex = endIndex != undefined ? endIndex : 0;
51+
};
52+
4753
// Armature
4854
if(ccs.Armature){
4955
ccs.Armature.prototype.setBody = function( body ) {

0 commit comments

Comments
 (0)