我如何在 Xcode 中使用 cocos2d?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1256008/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do i use cocos2d with Xcode?
提问by Zeeshan Raja
I downloaded the lastest version of cocos2d but I am confused as to how to use it with my current project. Can anyone show me how to use it with xcode. I'm looking to design a 2D maze. Do i have to import something ? Any sort of help would be appreciated.
我下载了最新版本的 cocos2d,但我对如何在当前项目中使用它感到困惑。谁能告诉我如何在 xcode 中使用它。我正在寻找设计一个二维迷宫。我必须进口一些东西吗?任何形式的帮助将不胜感激。
回答by John
Yes, you need to drag the cocos2d files into your project, then they will be available.
是的,您需要将 cocos2d 文件拖到您的项目中,然后它们才可用。
This is a very helpful step-by-step resource on how to do that.
这是关于如何做到这一点的非常有用的分步资源。
http://monoclestudios.com/cocos2d_whitepaper.html
http://monoclestudios.com/cocos2d_whitepaper.html
As far as designing your game, get started, play around, and look at the sample code. There are also very helpful folks on the message board.
至于设计您的游戏,请开始、尝试并查看示例代码。留言板上也有非常乐于助人的人。
http://www.cocos2d-iphone.org/forum/
http://www.cocos2d-iphone.org/forum/
Good luck!
祝你好运!
回答by antonmills
For the latest version of Cocos2D-iPhone (0.8.1) I've put together a tutorial at: http://www.antonmills.com/?p=233
对于最新版本的 Cocos2D-iPhone (0.8.1),我整理了一个教程:http://www.antonmills.com/?p=233
It includes everything you need for setting up the Xcode template, adding sprites and a small animation loop in a Hello World type of application, might be helpful :)
它包括设置 Xcode 模板、在 Hello World 类型的应用程序中添加精灵和小动画循环所需的一切,可能会有所帮助:)
also deffinitely check the forum John posted, very helpful lot :)
也一定要检查约翰发布的论坛,非常有帮助:)
Cheers, anton.
干杯,安东。