ITæ¥çã®äžçã«èªåã®äººçãã€ãªããããšæã£ãŠããåå¿è ããããããŒã«ãšã£ãŠéèŠãªãã€ã³ãã1ã€ãããŸãã æãå¿«é©ãªèªå·±æè²æŠç¥ãèªåã§æ±ºå®ããå¿ èŠããããŸãã 1ã€ã¯å®çšçãªã¿ã¹ã¯ãå®æçã«è§£æ±ºããå¿ èŠãããããã1ã€ã¯çè«ã®åŸ®åŠãªãã¥ã¢ã³ã¹ãç解ãããŸã§åããŸããã å®éã倧å€æ°ã¯ã圌ãã®æå³ã®çŽç²ãã«ãããããããäž»ãªä»äºã家æãå人ã趣å³ãæã£ãŠããŸã...ãããŠããšã«ããããã¹ãŠã®ãã®æ¥åžžçãªæžŠã¯ããªãã®ãã¬ãŒãã³ã°ã®æéãšè³ªã«åœ±é¿ããŸãã ãããŠãããã¯ããªããé·ãç®±ã«ããªãã®æ¯æ¥ã®æŽ»åãæããŠã圌ãã«äºåºŠãšæ»ã£ãŠããªããšããäºå®ã«ã€ãªãããŸãã
ç§ã«ãšã£ãŠãæãå¿«é©ãªéçºæ¹æ³ã¯ãã²ãŒã ãŸãã¯ã¢ããªã±ãŒã·ã§ã³ã®åœ¢ã§çµæã®å šäœçã§æ確ãªç»åãèŠãããšãã§ãããšãã ãšå€æããŸããã ãã©ãããã©ãŒã ãšããŠãiOSãšããã«ä»éããèšèªã§ããApple-Objective-CãéžæããŸããã Cocos2d-iphoneã¯ãã²ãŒã ãã¬ãŒã ã¯ãŒã¯ã«æé©ã§ããã ã·ã³ãã«ã§ç¡æã§ãããã€ã³ã¿ãŒãããäžã«èšå€§ãªæ°ã®äŸãšãã¥ãŒããªã¢ã«ããããŸãã
ã²ãŒã èªäœã«ã€ããŠããã¡ã³ã¿ãžãŒã§ã©ã®ããã«èŠãããããããŠãããå®è£ ããããã«äœãããå¿ èŠããããã«ã€ããŠè©±ãããæã§ãã
ãããžã§ã¯ãã®ã¢ã€ãã¢
ãã®ã²ãŒã ã¯ããŽãŒã¹ãã·ãã¥ã¬ãŒã¿ãŒããšåŒã°ããã¯ãšã¹ãããºã«ãšã·ãã¥ã¬ãŒã¿ãŒã¢ã³ãã¹ãã¬ã¹ã®çµã¿åããã§ãã ããªãã®ããŒããŒã¯ç¥ç§çãªç¶æ³ã§æ»ã«ã幜éã«ãªããŸãã ãããã人çã¯ããã§çµããã§ã¯ãªããéã«ãã¯ããã«æ¥œãããã®ã«ãªããŸãã çµå±ã®ãšãããä»ãããªãã¯åœŒããæãããã圌ãããã¹ããªãŒã«é£ããŠè¡ãããšã«ãã£ãŠã人çã®ãã¹ãŠã®ç¯çœªè ã«åŸ©takeããããšãã§ããŸãã
ã²ãŒã ãã¬ã€ã¯æªè ã®éšå±ã«ããããšã«ãªããŸãã ããŸããŸãªãªããžã§ã¯ããã·ããããããšã§ã被害è ã®ææãé€ãããšãã§ãããããã匷ããªããããè€éãªããªãã¯ãå®è¡ã§ããŸãã æåã®ã¹ã±ããã¯æ¬¡ã®ãšããã§ãã
ã¢ã€ãã¢ã¯çããŠããã ãããããããå®è£ ããã«ã¯ãæåã«ããã°ã©ãã³ã°æ¹æ³ãåŠã¶å¿ èŠããããŸãã ãŸãã誰ããèªåã§èšèªãšæ å ±æºãåŠç¿ããæ¹æ³ãéžæããå¿ èŠããããŸãã Objective-Cã®åŠç¿èšç»ã®ã¿ãæäŸã§ããŸãã ç¹å®ã®æ¬ã§ã¯ãªããã€ã³ã¿ãŒãããã§èª¬æãæ¢ããŠãããããã¯ã«ã€ããŠå匷ããããšãææ¡ããŸãã ããã«ãããããå€ãã®æ å ±ã®äžã§æ©äŒãäžããããŸãã ãªãœãŒã¹ãæãç解ããããèªã¿ããããã®ãéžæããããã«ãæ°ããæŠå¿µã®èª€ã£ã解éã®å¯èœæ§ãæžãããŸãã ç§ã«æãé©ããæ¬ã¯ãStephen CochanãProgramming on Objective-C 2.0ããBert AltenbergãAlex ClarkeãBecome an Xcoderããããã³ãããªãã¥ãŒããªã¢ã«www.youtube.com/user/MacroTeamChannelãmacscripter.ru WebãªãœãŒã¹ã§ããã ãimaladec.comã
äžè¬ã«ã100ãã«ã§å€ãMacBookãè³Œå ¥ããXcodeããŒãžã§ã³4.3ïŒæ°ããããŒãžã§ã³ã¯ã€ã³ã¹ããŒã«ãããŠããŸããïŒãã¢ããããŒãããŠã次ã®ãããã¯ã®åŠç¿ãéå§ããŸããã
-ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã
-Xcodeã®ã€ã³ã¿ãŒãã§ã€ã¹ãšèŠçŽ ã
-ããªããã£ãããŒã¿åã
-ãªããžã§ã¯ããšã¯ã©ã¹ã NSDateãïŒdefineãNSStringã å€æ°ã®ã¹ã³ãŒãã
-ã¡ãœããã ã»ã¬ã¯ã¿ãŒ
-é åã NSArrayãNSMutableArrayãNSSetãNSDictionaryãNSNumberã
-ç¬èªã®äœæã ã¯ã©ã¹ïŒïŒimportã interface ã@ implementationã private ãpublicãprotectedã readonly ãreadwriteãsetterãgetterïŒã
-ããããã£ã
-OOPãã©ãã€ã ïŒç¶æ¿ãããªã¢ãŒãã£ãºã ãã«ãã»ã«åã
-ã«ããŽãªãŒã
-ãã¿ãŒã³ã MVCïŒéç¥ãããªã²ãŒããã¢ãŠãã¬ãããã¿ãŒã²ãããéä¿¡è ã
-View Controllerã®ã©ã€ããµã€ã¯ã«ã
-å§ä»»ã ãããã³ã«ïŒæé©ãå¿ é ïŒã
-ãããã¯ã
-ãã¥ãŒããžã§ã¹ãã£ãŒèªèã
-ãã«ãã¹ã¬ããïŒGCDïŒãKVOãããŒããã£ã¹ã¿ãŒãUIAlertViewãUIActionSheetã
-ã·ã³ã°ã«ãã³ã
-ã¡ã¢ãªã®æäœïŒä¿æããªãªãŒã¹ãèªåãªãªãŒã¹ïŒã ARCã
-ãããã¯ãŒã¯ãæäœããŸãã ããŒã¿ãããŠã³ããŒãããŸãã NSCasheã
-JSONã
å°ããªçè«ã解ããŠãã®çè«ãç 究ããåŸãããã°ã©ã ãšã¯äœããäœãã®ããã°ã©ãã³ã°ããã»ã¹ãã©ã®ããã«æ©èœãããã«ã€ããŠã®äžè¬çãªã¢ã€ãã¢ãåŸãŸããã ã²ãŒã ã«æ»ã£ãŠãç§ã®èšç»ãå®çŸããããšãããã«çŸå®çã§ããããç解ããæãæ¥ãŸããã
ã²ãŒã ã®ä»çµã¿
çµå±ã®ãšãããcocosãšã³ãžã³ã®ãããã§ãã²ãŒã ã¯éåžžã«ç°¡åã«å®è£ ã§ããã¯ãã§ãã æåã®ã·ãŒã³ãäœæããèæ¯ãšããŠæ©èœããã¡ã€ã³ã¬ã€ã€ãŒãè¿œå ããã¹ãã©ã€ãã®åœ¢ã§ç»åãè¿œå ããã¡ãã¥ãŒé ç®ãè¿œå ããŸãã cocos2dã¯ARCããµããŒãããŠããªããããå¥ã®ã·ãŒã³ãžã®ãã©ã³ãžã·ã§ã³ãäœæããdeallocã¡ãœããã§ãã¹ãŠã®äœ¿çšæžã¿ãªããžã§ã¯ãããªã»ããããŸã...
// Import the interfaces #import "HelloWorldLayerr.h" #import "CCTouchDispatcher.h" #import "CCAnimation.h" #import "SimpleAudioEngine.h" #import "LanguageOfGame.h" #import "LanguageOfGameUA.h" #import "LanguageOfGameRu.h" CCScene* scene; CCMenu* startMenu; // HelloWorldLayer implementation @implementation HelloWorldLayerr +(CCScene *) scene { // 'scene' is an autorelease object. scene = [CCScene node]; // 'layer' is an autorelease object. HelloWorldLayerr *layer = [HelloWorldLayerr node]; // add layer as a child to scene [scene addChild: layer]; // return the scene return scene; } // on "init" you need to initialize your instance -(id) init { if( (self=[super init])) { CGSize size = [[CCDirector sharedDirector] winSize]; // 16- [CCTexture2D setDefaultAlphaPixelFormat:kCCTexture2DPixelFormat_RGB565]; CCSprite* startPicture = [CCSprite spriteWithFile:@"startMenu.png"]; startPicture.scale = 0.5; startPicture.position = ccp(size.width/2, size.height/2); [self addChild: startPicture z:1]; CCLabelTTF *languageLabel = [CCLabelTTF labelWithString:@"Choose your language" fontName:@"AppleGothic" fontSize:30]; languageLabel.anchorPoint = CGPointMake(0, 0.5f); languageLabel.color = ccYELLOW; languageLabel.position = ccp(size.width*0.05, size.height*9/10); [self addChild:languageLabel z:2]; CCMenuItemFont* button1 = [CCMenuItemFont itemFromString:@"ENG" target:self selector:@selector(selector1:)]; button1.color = ccYELLOW; CCMenuItemFont* button2 = [CCMenuItemFont itemFromString:@"UA" target:self selector:@selector(selector2:)]; button2.color = ccYELLOW; CCMenuItemFont* button3 = [CCMenuItemFont itemFromString:@"RU" target:self selector:@selector(selector3:)]; button3.color = ccYELLOW; startMenu = [CCMenu menuWithItems:button1, button2,button3, nil]; button1.position = ccp(size.width/4, size.height*8/10); button2.position = ccp(size.width/4, size.height*6.5/10); button3.position = ccp(size.width/4, size.height*5/10); startMenu.position = CGPointZero; [self addChild:startMenu z:10]; } return self; } -(void)selector1:(id)sender{ CCTransitionRadialCCW *transition = [CCTransitionZoomFlipX transitionWithDuration:1.1 scene:[LanguageOfGame scene]]; [[CCDirector sharedDirector] replaceScene:transition]; } -(void)selector2:(id)sender{ CCTransitionRadialCCW *transition = [CCTransitionZoomFlipX transitionWithDuration:0.8 scene:[LanguageOfGameUA scene]]; [[CCDirector sharedDirector] replaceScene:transition]; } -(void)selector3:(id)sender{ CCTransitionRadialCCW *transition = [CCTransitionZoomFlipX transitionWithDuration:0.8 scene:[LanguageOfGameRu scene]]; [[CCDirector sharedDirector] replaceScene:transition]; } //on "dealloc" you need to release all your retained objects - (void) dealloc { [scene release]; [startMenu release]; [super dealloc]; } @end
ãã®ãããã¯ã«é¢ããã€ã³ã¿ãŒãããäžã®ã¬ãã¹ã³ã¯ãã§ã«ããããããã®ã§ãã²ãŒã ã«æ°ãããã©ã°ã¡ã³ããåŸã ã«è¿œå ããæ¹æ³ã«ã€ããŠã®èšäºãæ£ããããŸããã ãããããç¬éã ããèããŸãã ããšãã°ããŸãã§ãã®ç¬éã«å¹œéãéšå±ã®åšãã«èŠããªãããã«æµ®éããŠãããã®ããã«ãæã§ç»é¢ã«è§ŠããåŸã«çœãã«ãŒãã䌞ã³ãããã«ãããã£ãã®ã§ãã 幞ããªããšã«ããã®å Žåã§ãã³ã³ãããã®æ¹æ³ããããŸãã ãã®å®è£ ã¯æ¬¡ã®ãšããã§ãã
CCMotionStreak* streak; // -(void) ccTouchMoved:(UITouch *)touch withEvent:(UIEvent *)event{ NSLog(@"TouchesMoved"); CGPoint touchLocation = [self convertTouchToNodeSpace:touch]; CGPoint oldTouchLocation = [touch previousLocationInView:touch.view]; oldTouchLocation = [[CCDirector sharedDirector] convertToGL:oldTouchLocation]; oldTouchLocation = [self convertToNodeSpace:oldTouchLocation]; CGPoint changedPosition = ccpSub(touchLocation, oldTouchLocation); // [self moveMotionStreakToTouch:touch]; } -(void)moveMotionStreakToTouch:(UITouch*)touch{ CCMotionStreak* streak = [self getMotionStreak]; streak.position = [self locationFromTouch:touch]; } -(CGPoint)locationFromTouch:(UITouch*)touch{ CGPoint touchLocation = [touch locationInView:[touch view]]; return [[CCDirector sharedDirector] convertToGL:touchLocation]; } // -(CCMotionStreak*)getMotionStreak{ streak = [CCMotionStreak streakWithFade:0.99f minSeg:8 image:@"ghost01.png" width:22 length:48 color:ccc4(255, 255, 255, 180)]; [self addChild:streak z:5 tag:1]; CCNode* node = [self getChildByTag:1]; NSAssert([node isKindOfClass:[CCMotionStreak class]], @"not a CCMotionStreak"); return (CCMotionStreak*)node; } /* , CCMotionStreak */ -(void) ccTouchEnded:(NSSet *)touch withEvent:(UIEvent *)event{ NSLog(@"TouchesEnded"); selectedSprite = nil; streak = nil; }
ã²ãŒã ã®ããžãã¯ã¯ãæ£ããé åºã§ããŒããŒãæãããããã³ã«å¢å ããåçŽãªãintãã«ãŠã³ã¿ãŒããããšããäºå®ã«åž°çããŸãã ç®çã®ã·ãŒã±ã³ã¹ã決å®ããã«ã¯ããŽãŒã¹ãã®ããã«èããå¿ èŠããããŸãã ãã¡ããããã³ãã䜿çšã§ããŸãã ã«ãŠã³ã¿ãŒå€ãå¿ èŠãªå€ãããäœãå Žåããªããžã§ã¯ãã«å¯ŸããŠã¢ã¯ã·ã§ã³ãå®è¡ã§ããŸããã ãã®å Žåããã®ã¢ã€ãã ãã¯ãªãã¯ãããšãè²ããããã«å€åããŸããããã¯ããã®ã¢ã€ãã ã«å¯Ÿããã¢ã¯ã·ã§ã³ãåŸã§å©çšã§ããããšãæå³ããŸãã
éšå±ã®ç®çã®ã¢ã€ãã ãã¿ãããããšãã¢ãã¡ãŒã·ã§ã³ã®ãã§ãŒã³ãå§ãŸããŸãã 圌ã¯èªåã§ãã¹ãŠã®ãªããžã§ã¯ããæããã®ã§ãå°ãªããšãæãããããšãå€æããŸããããã¢ãŒãã£ã¹ãã®éªšã®æããä»äºã«ã€ããŠå¥ã«èšåããããšæããŸãã
ã¢ãã¡ãŒã·ã§ã³
cocos2dã«ã¯ãã¹ãã©ã€ããšãã¬ãŒã ããšã®2çš®é¡ã®ã¢ãã¡ãŒã·ã§ã³ããããŸãã ã¹ãã©ã€ãã¢ãã¡ãŒã·ã§ã³ã¯ãç»é¢äžã§ç»åãåããæãç°¡åãªæ¹æ³ã§ãã ã¢ã¯ã·ã§ã³ã®è»è·¡ã®ã¿ãèšå®ããŸãã 次ã«ãã·ã¹ãã ã¯ãã¹ãŠã®åŠçãè¡ããã¢ãã¡ãŒã·ã§ã³ã®ãã¹ãŠã®ãã¬ãŒã ãæå®ã®ãµã€ã¯ã«ã§å®è¡ããŸãã
// -(void) nextFrame:(ccTime)dt{ bottle.positionInPixels = ccp(bottle.positionInPixels.x - 1, + bottle.positionInPixels.y); if (bottle.positionInPixels.x <= 49) { bottle.positionInPixels = ccp(bottle.positionInPixels.x + 1, + bottle.positionInPixels.y); } } -(void)moveTouchedObject:(CGPoint)changedPosition { if (selectedSprite == bottle) { [self nextFrame:5]; } }
ãã¬ãŒã ããšã®ã¢ãã¡ãŒã·ã§ã³ã䜿çšããŸããã
// CCSprite *crashBottle2 = [CCSprite spriteWithFile:@"crashBottle01.png"]; crashBottle2.scale = 0.5; [crashBottle2 setPosition:ccp(xOfBottle, yOfBottle)]; [self addChild:crashBottle2]; CCAnimation *cbot = [CCAnimation animation]; [cbot addFrameWithFilename:@"crashBottle00.png"]; [cbot addFrameWithFilename:@"crashBottle01.png"]; [cbot addFrameWithFilename:@"crashBottle02.png"]; [cbot addFrameWithFilename:@"crashBottle03.png"]; [cbot addFrameWithFilename:@"crashBottle04.png"]; [cbot addFrameWithFilename:@"crashBottle05.png"]; [cbot addFrameWithFilename:@"crashBottle06.png"]; [cbot addFrameWithFilename:@"crashBottle07.png"]; [cbot addFrameWithFilename:@"crashBottle08.png"]; [cbot addFrameWithFilename:@"crashBottle09.png"]; [cbot addFrameWithFilename:@"crashBottle10.png"]; [cbot addFrameWithFilename:@"crashBottle11.png"]; id animationAction = [CCAnimate actionWithDuration:0.2f animation:cbot restoreOriginalFrame:NO]; [crashBottle2 runAction:animationAction];
ãã ãããã®ã¢ãããŒãã§ã¯ãã°ã©ãã£ãã¯ã¢ããã¿ãŒãåã€ã¡ãŒãžãåå¥ã«åŠçãããããããã©ãŒãã³ã¹ã«å³åº§ã«åœ±é¿ããŸãã ç·ã®ã¢ãã¡ãŒã·ã§ã³ã®ããã«ãæ°ããæ¹æ³-ãã¯ã¹ãã£ã®ã¢ãã©ã¹ãåŠã¶å¿ èŠããããŸããã
ãŸããPhotoshopã§ãã£ã©ã¯ã¿ãŒãå®å šã«æç»ããå¿ èŠããããŸããã ãã®åŸãç»åãäœã®éšåã«åå²ããå¥ã ã®ç»åãšããŠä¿åããŸãã 次ã®ã¹ãããã¯ãSprite Helper PROããã°ã©ã ãããŠã³ããŒãããŠã€ã³ã¹ããŒã«ããããšã§ãã ãã®å©ããåããŠã10ç§ã®éªšæ Œã¢ãã¡ãŒã·ã§ã³ãäœæããã¹ããŒãªãŒããŒããéå§ããåºåã§360æã®ã¢ãã¡ãŒã·ã§ã³ç»åãååŸããŸãã 次ã«ãTexture Packerããã°ã©ã ã䜿çšããŠããã¹ãŠã®ç»åã1ã€ã®å·šå€§ãªãã£ã³ãã¹ã«ç§»åããããããOpenGLãå¿ èŠãªéšåãåãåããŸãã Texture Packerã¯.plistããã¥ã¡ã³ããäœæããŸããããã«ãããåã ã®ãã©ã°ã¡ã³ãã®ç¹æ§ã«ãã°ããå°éã§ããŸãã ç»åãšplistãã¡ã€ã«ãXcodeã®ãµããŒããããŠãããã¡ã€ã«ãã©ã«ããŒã«ã€ã³ããŒãããã¢ãã¡ãŒã·ã§ã³ãéå§ããã³ãŒããèšè¿°ããŸãã
CCSprite *manFrame1; CCAnimate *manCodding; CCRepeatForever* repeat; // -(void)manAnimation{ // - - CCSpriteBatchNode *manBatchNode; [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"man300N.plist"]; manBatchNode = [CCSpriteBatchNode batchNodeWithFile:@"man300N.png"]; [self addChild:manBatchNode]; CCSpriteBatchNode *manBatchNode2; [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"man359N.plist"]; manBatchNode2 = [CCSpriteBatchNode batchNodeWithFile:@"man359N.png"]; [self addChild:manBatchNode2]; manFrame1 = [CCSprite spriteWithSpriteFrameName:@"UntitledAnimation_0.png"]; manFrame1.position = ccp(size.width*0.4187,size.height*0.4281); [self addChild:manFrame1 z:30]; // NSString* fullFileName = @"man1Anim.plist"; NSString* rootPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; NSString* plistPath = [rootPath stringByAppendingPathComponent:fullFileName]; if (![[NSFileManager defaultManager] fileExistsAtPath:plistPath]) { plistPath = [[NSBundle mainBundle] pathForResource:@"man1Anim" ofType:@"plist"]; } NSDictionary* animSettings = [NSDictionary dictionaryWithContentsOfFile:plistPath]; if (animSettings == nil){ NSLog(@"error reading plist"); } NSDictionary* animSettings2 = [animSettings objectForKey:@"man1Anim"]; float animationDelay = [[animSettings2 objectForKey:@"delay"] floatValue]; CCAnimation * animToReturn = [CCAnimation animation]; [animToReturn setDelay:animationDelay]; NSString* animationFramePrefix = [animSettings2 objectForKey:@"namePrefix"]; NSString* animationFrames = [animSettings2 objectForKey:@"animationFrames"]; NSArray* animFrameNumbers = [animationFrames componentsSeparatedByString:@","]; for (NSString* frameNumber in animFrameNumbers) { NSString* frameName = [NSString stringWithFormat:@"%@%@.png", animationFramePrefix, frameNumber]; [animToReturn addFrame:[[CCSpriteFrameCache sharedSpriteFrameCache] spriteFrameByName:frameName]]; } manCodding = [CCAnimate actionWithAnimation:animToReturn]; repeat = [CCRepeatForever actionWithAction:manCodding]; [manFrame1 runAction:repeat]; }
ãã®çµæã360é£ç¶ãã¬ãŒã ããæ£ããã¢ãã¡ãŒã·ã§ã³ãååŸããŸãã ãã£ã©ã¯ã¿ãŒãããã«ãããã足ãåŒã£åŒµãã®ããèŠãã®ã¯ããªããŠæ¥œããããšã§ãããïŒ
ã²ãŒã ãäœæãããèŠåãããã¹ãŠåé€ããåŸãããããçš®é¡ã®ãã°ãä¿®æ£ããã®ã«çŽ1ãæããããŸããã ãŸãã4å°ç®ã®Xcodeãã6å°ç®ã«ããã°ã©ã ã転éããiPhoneããã€ã¹ã§ã©ã€ãã§å®è¡ããã«ã¯ãæ°ããMacãiPhoneã䜿çšããŠãã人ãè¿œããããªããã°ãªããŸããã§ããã
äžæ°å³ãªé»ãé·æ¹åœ¢ãªãã§ã¢ããªã±ãŒã·ã§ã³ã4çªç®ãš6çªç®ã®iPhoneã«çãã衚瀺ããã«ã¯ãå£çŽãæ£ããæ§æããå¿ èŠããããŸãã ã€ã³ã¿ãŒãããã«ã¯ãã®åé¡ã«å¯Ÿããå€ãã®è§£æ±ºçããããŸãïŒããšãã°ãèšäºhttp://www.raywenderlich.com/33525/how-to-build-a-monkey-jump-game-using-cocos2d-2-x-physicseditor-texturepacker-part- 1 ïŒãããããããã¯ãã¹ãŠäžåçã«è€éã§ãã ãµã€ãºã1136x640ã®å¥ã®èæ¯ç»åãäœæããã¡ã€ã³ã®initã¡ãœããã®æåã«æ¡ä»¶ãæžã蟌ãã ãã§ååã§ãã
-(id) init { if( (self=[super init])) { size = [[CCDirector sharedDirector] winSize]; if (size.width > 500) { CCSprite* walls = [CCSprite spriteWithFile:@"walls.png"]; walls.position = ccp(size.width/2, size.height/2); walls.scale = 0.5; [self addChild:walls z:-10]; size.width = [CCDirector sharedDirector].winSize.width - 87; } ⊠}
ãããã«
ã¡ã€ã³ã²ãŒã ã·ãŒã³ã®ã³ãŒãã¯1300è¡ã«åãŸããŸãã æ¬æ Œçãªè£œåã«ã¯ã¢ãŒãã£ã¹ããå¿ èŠãªãããã¢ããªã±ãŒã·ã§ã³ã¯1ã¬ãã«ã®ãã¢ããŒãžã§ã³ãšããŠèšèšãããŠããŸããã²ãŒã å šäœã®ã»ãšãã©ãèŠèŠå¹æã«é¢é£ä»ããããŠããŸãã
ããããã¢ããªã±ãŒã·ã§ã³ã®èšèšäžã®æ¬ é¥ã«ãããããããç§ã¯æåã«èããŠãããã¹ãŠã®æ©èœãå®è£ ããŸããã ã²ãŒã ã¯ãã³ã°ãããã¯ã©ãã·ã¥ããŸããã ãããŠãç§ã¯æ¬åœã«æ°ããç§åŠåéãç 究ããããšã楜ããããšãã§ããŸããã æåã®ããã°ã©ãã³ã°èšèªãšããŠãObjective-Cã¯éåžžã«å¿«é©ã§çŽæçã«æ£åœåãããããã«æããŸããã
ãã®èšäºããåå¿è ã®ããã°ã©ããŒãšãç§ã®ã¢ã€ãã¢ãæ°åã¯ãŒã«ã«éçºã§ããçµéšè±å¯ãªé人ã®äž¡æ¹ã«ãšã£ãŠãæ°ããèããšè§£æ±ºçã«ã€ãªããããšãé¡ã£ãŠããŸãã
çŸåšãã¢ããªã±ãŒã·ã§ã³ã¯Apple Storeã§ã®å ¬éãåŸ ã£ãŠããŸãã ãã¹ãã«åæ Œããããã³ã¡ã³ãå ã®ãªã³ã¯ããªã»ããããŸãã ãããŸã§ã®éãäœãèµ·ãã£ããã®ãããªãèŠãããšãã§ããŸãã