Your SlideShare is downloading. ×
0
09   creating windows phone game with cocos2d-xna
09   creating windows phone game with cocos2d-xna
09   creating windows phone game with cocos2d-xna
09   creating windows phone game with cocos2d-xna
09   creating windows phone game with cocos2d-xna
09   creating windows phone game with cocos2d-xna
09   creating windows phone game with cocos2d-xna
09   creating windows phone game with cocos2d-xna
09   creating windows phone game with cocos2d-xna
09   creating windows phone game with cocos2d-xna
09   creating windows phone game with cocos2d-xna
09   creating windows phone game with cocos2d-xna
09   creating windows phone game with cocos2d-xna
09   creating windows phone game with cocos2d-xna
09   creating windows phone game with cocos2d-xna
09   creating windows phone game with cocos2d-xna
09   creating windows phone game with cocos2d-xna
09   creating windows phone game with cocos2d-xna
09   creating windows phone game with cocos2d-xna
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

09 creating windows phone game with cocos2d-xna

334

Published on

tory xu (microsoft) and xiaoming zhang

tory xu (microsoft) and xiaoming zhang

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
334
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Put People First 以人为本基于cocos2d-x for XNA的Windows Phone游戏开发全新 ・ 全易
  • 2. 徐玉涛 Tory Xu技术平台合作经理开发工具与平台事业部微软(中国)有限公司toryxu@microsoft.com微博:@徐玉涛Tory Xu 欢迎
  • 3. 以人为本 —— 联接消费者与开发者" 不同的设备,⼀一致的体验 统⼀一的开发平台
  • 4. Windows Phone 全新 · 全易
  • 5. 游戏开发者的 全新 · 全易 " 90% 市场机会全新 设备规格 工具体系全易 游戏框架
  • 6. Cocos2d-x for XNA" Hello World C# with XNA 50% Windows Phone 7.5 工作量 http://download.cocos2d-x.org MIT License 开放下载 开源
  • 7. 春”Phone” 开发者计划8个第三方开发者SDK版开放下载
  • 8. 张小明"Cocos2d-x核心开发者xiaoming.zhang@cocos2d-x.org 走进 cocos2d-x for XNA
  • 9. 主要内容"Ø Cocos2d-x for XNA与cocos2d-x的关系Ø Cocos2d-x for XNA提供哪些功能,怎么用Ø Cocos2d-x cocos2d-x for XNA
  • 10. Cocos2d-x for XNA与cocos2d-x关系"class Engine: public API class API{ { public : virtual void string language; addChild(CCNode*)=0; string supportPlatforms; …}; };// language = “c++”// supportPlatforms = “iOS Android …” // language = “c#”class cocos2d-x: public Engine // supportPlatfroms = “windows{ phone7”public : class cocos2d-x_for_xna : public virtual void addChild(CCNode*); Engine}; { public : virtual void addChild(CCNode*); };
  • 11. Cocos2d-x for XNA提供的功能"Ø 显示图片Ø 动画效果Ø 粒子效果Ø 显示文本Ø 添加菜单Ø 播放音乐音效…
  • 12. 显示图片"// c++CCSprite *pSprite = CCSprite::spriteWithFile(“helloworld.png”);pSprite->setPosition(ccp(100, 100));addChild(pSprite);// c#CCSprite sprite = CCSprite.spriteWithFile(“helloworld”);sprite.position = new CCPoint(100, 100);addChild(sprite);
  • 13. 动画效果"// c++CCMoveTo *moveTo = CCMoveTo::actionWithDuration(2, ccp(50, 50));pSprite->runAction(moveTo);// c#CCMoveTo moveTo = CCMoveTo.actionWithDuration(2, new CCPoint(50, 50));sprite.runAction(moveTo);
  • 14. 粒子效果"// c++CCParticleSystem *particle = CCParticleFlower::node();particle->setTexture(pSprite->getTexture());particle->setPosition(ccp(100, 100));addChild(particle);// c#CCParticleSystem particle = new CCParticleFlower();particle.texture = sprite.texture;particle.position = new CCPoint(100, 100);addChild(particle);
  • 15. 显示文本"// c++CCLabelTTF *pLabel = CCLabelTTF::labelWithString(“hello”, “Arial”, 20);pLabel->setPosition(ccp(100, 100));addChild(pLabel);// c#CCLabelTTF label = CCLabelTTF.labelWithString(“hello”, “Arial”, 20);label.position = new CCPoint(100, 100);addChild(label);
  • 16. 添加菜单"// c++SimpleAudioEngine::sharedEngine()->playBackgroundMusic(“bg.mp3”);CCMenuItemLabel *pItemLabel = CCMenuItemLabel::itemWithLabel(“item”);SimpleAudioEngine::sharedEngine()->playEffect(“effect.ogg”);CCMenu *pMenu = CCMenu::menuWithItems(pItemLabel, NULL);pMenu->setPosition(ccp(100, 100));// c#addChild(pMenu);SimpleAudioEngine.sharedEngine().playBackgroundMusic(“bg”);SimpleAudioEngine.sharedEngine().playEffect(“effect”);// c#CCMenuItemLabel itemLabel = CCMenuItemLabel.itemWithLabel(“item”);CCMenu menu = CCMenu.menuWithItems(itemLabel);menu.position = new CCPoint(100, 100);addChild(menu);
  • 17. 播放音效"// c++SimpleAudioEngine::sharedEngine()->playBackgroundMusic(“bg.mp3”);SimpleAudioEngine::sharedEngine()->playEffect(“effect.ogg”);// c#SimpleAudioEngine.sharedEngine().playBackgroundMusic(“bg”);SimpleAudioEngine.sharedEngine().playEffect(“effect”);
  • 18. Cocos2d-x移植到cocos2d-x forXNA相同点:1.  接口相同2.  引擎框架相同3.  同样的社区支持不同点(语言差异):1.  内存管理2.  成员变量访问3.  资源访问4.  微软、诺基亚的大力支持
  • 19. 徐玉涛toryxu@microsoft.com张小明xiaoming.zhang@cocos2d-x.org谢谢 Thanks

×