cocos2d / ccbreader Goto Github PK
View Code? Open in Web Editor NEWThis project forked from tchaikov/ccbreader
CCBReader for CocosBuilder
This project forked from tchaikov/ccbreader
CCBReader for CocosBuilder
CCBReader Version: #define kCCBVersion 5
Found a small bug of CCScale9Sprite when working the
Before bugfix:
- (void) updateWithBatchNode:(CCSpriteBatchNode *)batchnode rect:(CGRect)rect rotated:(BOOL)rotated capInsets:(CGRect)capInsets
{
GLubyte opacity = opacity; // opacity is always zero
......
}
After
- (void) updateWithBatchNode:(CCSpriteBatchNode *)batchnode rect:(CGRect)rect rotated:(BOOL)rotated capInsets:(CGRect)capInsets
{
GLubyte opacity = self.opacity; // opacity is assigned
......
}
I tried to load it in background. And I get a totally black scene with no images.
Hello,
I got some issues when since I added the last version of CCBReader with Cocos2D 2.1 rc0
in CCBAnimationManager.h
use "target" property instead of target
in CCScrollView
use "visible" instead of visible
use "grid" instead of grid
use "children" instead of children
in CCScale9Sprite
CCControlExtension/CCControl/Utils/CCScale9Sprite.m:30:17: Auto property synthesis will not synthesize property declared in a protocol
CCControlExtension/CCControl/Utils/CCScale9Sprite.m:571:26: Variable 'contentSize' is uninitialized when used within its own initialization
Use "contentSize" instead contentSize
Use "anchorPoint" instead anchorPoint
CCControlSwitch
"shaderProgram" <= shaderProgram
"texture" <= texture
"quad" <= quad
CCScale9Sprite.m
Incomplete implementation
Auto property synthesis will not synthesize property declared in a protocol
Thanks.
Now the CCBReader need to read the data from the file, and parse the data everytime I create a CCNode by a ccbi file.
Is it possible to make a cache in the CCBReader?
If not copying the CCNode directly, at least remove the overhead of file I/O by caching the data?
In file CCBAnimationManager.h there is a animation managers delegate whitch retains scenes and doesen't release them.
@Property (nonatomic,retain) NSObject* delegate;
Hello,
I added a CCMenu into a CCScrollView node.
The scroll is ok but when I touch a CCMenuItem to slide the CCSCrollView the button is pressed.
Please help :).
Thanks
When putting a CCScale9Sprite on the CCLayer Interface file;
Cocos2d version: cocos2d-iphone v2.1
CCBReader version: #define kCCBVersion 5
Exception raise at the following location:
File: CCNode+CCBRelativePositioning.m
#ifdef __CC_PLATFORM_IOS
[self setValue:[NSValue valueWithCGSize:absSize] forKey:propertyName];
#else
[self setValue:[NSValue valueWithSize:NSSizeFromCGSize(absSize)] forKey:propertyName];
#endif
It will be fine if the "[self setValue]" removed or create a method "setValue" in CCScale9Sprite.m
Sorry that I don't know how to fix it yet!
Regards,
ken
I have a scene with a CCBFile. I've noticed that sometimes, but not every time, the main scene onDidLoadFromCCB
function is called before the one from the inner CCBFile, which causes some issues (such that the controller property isn't yet set on the inner CCBFile).
After a bit of investigation, the problem seems to be caused by CCBReader, which stores the animation managers in a dictionary with pointer values as keys.
When the BuilderReader load
function goes through the nodesWithAnimationManagers
, the order is then undefined.
Hi,
I am having some issues with CCControl. If I call control.isTouchEnabled = NO, then call control.isTouchEnabled = YES again, the control will no longer work.
The reason is because the CCControl's implementation, it actually registers targeted delegates in onEnter and onExit, instead of overriding CCLayer's registerWithTouchDispatcher. The default CCLayer's registerWithTouchDispatcher behavior actually registers a standard delegate, which results the issue I am facing.
The way I solve it is by modifying CCControl. I override the registerWithTouchDispatcher function which registers a targeted delegate. Inside onEnter and onExit, I simply calls self.isTouchEnabled = YES or self.isTouchEnabled = NO (You can wrap that around macro to add self.mouseEnabled too). I also removed the self.isTouchEnabled inside init function too, so touch is only enabled after onEnter.
Thank you for your time for reading!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.