cocos2d iPhoneで、マルチとして、ひとつのレイヤをタップの移動量によりスクロールさせようとすると、移動量に比例して黒い四角が表示されてしまうのですが、解決策は無いでしょうか?シミュレーターでは不具合なく、実機で試すと出てしまうんです。><
cocos2d iPhoneで、マルチとして、ひとつのレイヤをタップの移動量によりスクロールさせようとすると、移動量に比例して黒い四角が表示されてしまうのですが、解決策は無いでしょうか?シミュレーターでは不具合なく、実機で試すと出てしまうんです。><
//// HelloWorldLayer.m// scrollTest//// Created by admin on 11/09/05.// Copyright __MyCompanyName__ 2011年. All rights reserved.//// Import the interfaces#import "HelloWorldLayer.h"#import "BaseLayer.h"#import "TextLayer.h"// HelloWorldLayer implementation@implementation HelloWorldLayer+(CCScene *) scene{// 'scene' is an autorelease object.CCScene *scene = [CCScene node];// 'layer' is an autorelease object.HelloWorldLayer *layer = [HelloWorldLayer node];// add layer as a child to scene[scene addChild: layer];// return the scenereturn scene;}// on "init" you need to initialize your instance-(id) init{CCLOG(@"%@ : %@", NSStringFromSelector(_cmd), self);// always call "super" init// Apple recommends to re-assign "self" with the "super" return valueif( (self=[super init])) {BaseLayer *baseLayer = [BaseLayer node];[self addChild:baseLayer z:0 tag:0];TextLayer *textLayer = [TextLayer node];[self addChild:textLayer z:1 tag:1];}return self;}// on "dealloc" you need to release all your retained objects- (void) dealloc{// in case you have something to dealloc, do it in this method// in this particular example nothing needs to be released.// cocos2d will automatically release all the children (Label)// don't forget to call "super dealloc"CCLOG(@"%@ : %@", NSStringFromSelector(_cmd), self);[super dealloc];}@end