Cocos2d-x実践講座 in 鹿児島

of 19 /19
Cocos2d-x実践講座 ~少人数で実際にアプリ作りを体験しよう~ 株式会社TKS2 清水友晶 in 鹿児島

Embed Size (px)

description

2013/1/19 Cocos2d-x実践講座 in 鹿児島

Transcript of Cocos2d-x実践講座 in 鹿児島

  • 1. inCocos2d-x ~~ TKS2

2. TKS2(iOS, Android, Windows Phone 8)WebCocos2d-xCocos2d-xTwitter: tks2shimizuBlog: http://tks2.net/memoSlideShare: http://www.slideshare.net/doraemonsssFacebook: http://www.facebook.com/doraemonsss2 3. 3 4. 125iPhone4iPhoneiPhone(Retina 3.5inch) 4 5. CCSpritecreateCCSprite* button = CCSprite::create("xxx.png");setPositionbutton->setPosition(ccp(100,200));setTagbutton->setTag(10); 5 6. CCStringcreateCCString* string = CCString::create("xxxxxx");createWithFormatCCString* string = CCString::createWithFormat("frontside%02d.png", 10); 6 7. CCLayersetTouchEnabledthis->setTouchEnabled(true);this->setTouchMode(kCCTouchesOneByOne);7 8. ccTouchBeganccTouchMovedccTouchEndedccTouchCancelled 8 9. CCNode schedule this->schedule(schedule_selector( HelloWorld::countTimer)); countTimer() void HelloWorld::countTimer(float time) { gameTime += time; }9 10. CCNode unschedulethis->unschedule( schedule_selector(HelloWorld::countTimer));10 11. CCUserDefault()getFloatForKey float hoge =CCUserDefault::sharedUserDefault()-> getFloatForKey("xxx", 0);setFloatForKeyflush CCUserDefault::sharedUserDefault()->setFloatForKey("xxx", 10.5f); CCUserDefault::sharedUserDefault()->flush(); 11 12. CCMenuItemFontcreate CCMenuItemFont* item =CCMenuItemFont::create( "xxx", this, menu_selector(HelloWorld::yyy));CCMenu CCMenu* menu =CCMenu::create(item, NULL); menu->setPosition(CCPointZero); this->addChild(menu);12 13. http://tks2.net/other/cards.zip13 14. https://gist.github.com/4239354http://tks2.net/other/cards.zip14 15. https://gist.github.com/4239351http://tks2.net/other/cards.zip15 16. https://gist.github.com/4239350http://tks2.net/other/cards.zip16 17. https://gist.github.com/4239338http://tks2.net/other/cards.zip17 18. https://gist.github.com/423881718 19. 19