cocos2d v3에서 CCSprite의 image 변경하기 v3 미만 버전에서는 다른 방법이 필요했지만, v3에서는 좀 더 편하게 CCSpriete의 이미지 변경을 지원한다. 기존 CCSprite에서 spriteFrame만 CCSpriteFrame으로 변경해주면 된다. self.gameOverPanel.spriteFrame = [CCSpriteFrame frameWithImageNamed:@"LevelComplete.png"]; iDev/Cocos2D 2014.05.22
cocos2d에 UIGesture 추가하기 RayWenderlich의 캔디 크러시 따라 만들기를 SpriteKit에서 cocos2d v3로 포팅을 하고 있는데 UIGesture 부분이 나와서 삽질 아닌 삽질을 공유한다. 딱 한가지만 알아두면 된다. cocos2d에서 RootViewController(UIViewController)는 CCDirector이다. - (void)showGameOver { self.gameOverPanel.visible = YES; self.myscene.userInteractionEnabled = NO; self.tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hideGameOver)]; UIViewCon.. iDev/Cocos2D 2014.05.22