Skip to content

Commit dbc1921

Browse files
committed
Merge pull request cocos2d#4 from pandamicro/develop
Issue cocos2d#3897: Make Constructors public in Cocos2d-JS
2 parents 0cc16cd + 12aae0d commit dbc1921

File tree

8 files changed

+399
-384
lines changed

8 files changed

+399
-384
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,7 @@ Developers:
548548
hannon235 (Chris)
549549
Fixing a bug that the submenu of ExtensionTest in TestCpp can't scroll.
550550
Implements a socket.io client extension and adds a test case.
551+
Implements 'SIODelegate::fireEventToScript' method to integrate JSB event handling with the original native code.
551552

552553
pktangyue
553554
Fixing a bug that CCScale9Sprite::setInsetLeft/XXX can't work for rotated sprite frame.

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ cocos2d-x-3.0? ?? 2014
1313
[FIX] LuaBinding: Adds `addCustomHandler` in the ScriptHandlerMgr
1414
[FIX] LuaBinding: Upgrading LuaSocket to the latest version
1515
[FIX] Menu: Added missed scaleZ feature in ScaleTo and ScaleBy.
16+
[FIX] Network: Implements 'SIODelegate::fireEventToScript' method to integrate JSB event handling with the original native code.
1617
[FIX] Physics: PhysicsBody::setGravityEnable doesn't work correctly sometimes
1718
[FIX] Physics: PhysicsBody moves randomly when switch foreground/background
1819
[FIX] Physics: Refactors PhysicsDebugDraw

cocos/2d/CCComponent.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ enum {
4141

4242
class CC_DLL Component : public Ref
4343
{
44-
protected:
44+
CC_CONSTRUCTOR_ACCESS:
4545
/**
4646
* @js ctor
4747
*/

cocos/2d/CCDrawNode.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,13 @@ class CC_DLL DrawNode : public Node
9393

9494
// Overrides
9595
virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override;
96-
97-
protected:
96+
97+
CC_CONSTRUCTOR_ACCESS:
9898
DrawNode();
9999
virtual ~DrawNode();
100100
virtual bool init();
101101

102+
protected:
102103
void ensureCapacity(int count);
103104

104105
GLuint _vao;

cocos/2d/ccConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ To enable set it to a value different than 0. Disabled by default.
273273
protected by default.
274274
*/
275275
#ifndef CC_CONSTRUCTOR_ACCESS
276-
#define CC_CONSTRUCTOR_ACCESS protected
276+
#define CC_CONSTRUCTOR_ACCESS public
277277
#endif
278278

279279
#endif // __CCCONFIG_H__

0 commit comments

Comments
 (0)