Last active
December 20, 2015 16:29
-
-
Save wangxiaodong/6161463 to your computer and use it in GitHub Desktop.
cocos2d-x bugs
base on cocos2d-2.1rc0-x-2.1.3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ccCArray.cpp | |
// line: | |
//unsigned int ccArrayGetIndexOfObject(ccArray *arr, CCObject* object) | |
//{ | |
// for(unsigned int i = 0; i < arr->num; i++) | |
// { | |
// if( arr->arr[i] == object ) return i; | |
// } | |
// | |
// return CC_INVALID_INDEX; | |
//} | |
// this is wrong, as cocos foundation protocol, here should using isEqual | |
unsigned int ccArrayGetIndexOfObject(ccArray *arr, CCObject* object) | |
{ | |
for(unsigned int i = 0; i < arr->num; i++) | |
{ | |
if( arr->arr[i]->isEqual(object) ) return i; | |
} | |
return CC_INVALID_INDEX; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CCLayerLoader.cpp | |
// line: 7 | |
// #define PROPERTY_TOUCH_ENABLED "isTouchEnabled" | |
// ccbreader version 5 | |
// as cocosbuilder 3 alpha 5, is "touchEnabled" | |
#define PROPERTY_TOUCH_ENABLED "touchEnabled" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment