Adding Cocos2D only to already existing project?(仅将 Cocos2D 添加到现有项目?)
问题描述
我已经完成了 90% 的项目,我只想向其中添加 Cocos2D.我不需要 Box2D 或 Chipmunk.我该怎么做?我要添加哪些文件?我真的需要这样做,所以如果需要,最后我会提供赏金.
I already have a project that is 90% done and I want to add Cocos2D ONLY to it. I do not need Box2D or Chipmunk. How would I do this? What files do I add? I really need this done, so in the end ill offer a bounty if needed.
谢谢!
推荐答案
要开始将 Cocos2d 添加到项目中的更简单方法是遵循以下几行:
To start the easier way to add Cocos2d into your project is to follow these lines:
将 Cocos2d 文件导入到您的项目中,如下图所示:
Import the Cocos2d files into your project like the picture below:
然后像上一步一样将位于external"文件夹(进入Cocos2d库)的FontLabel"文件夹导入.
Then import the "FontLabel" folder which is located into the "external" folder (Into the Cocos2d library) like the previous step.
之后,您必须将 OpenGLES 和 QuartzCore 框架与您的项目链接:
After, you have to link the OpenGLES and QuartzCore frameworks with your project:
接下来在项目导航器"中,选择您的目标并打开构建设置"选项卡.
Next in the "Project navigator", select your target and open the "Build Settings" tab.
将 -lz 标志添加到其他链接器标志"中:
Add the -lz flag into the "Other Linker Flags":
就是这样!不,它应该可以正确编译.
That's all! No it should compile properly.
但是,如果您想将 Cocos2d 与 UIKit 框架一起使用,或者如果您想将其用作主要入口,我不会.如果您想了解有关这些步骤的更多详细信息,可以查看 Ray Wenderlich博客的帖子.
However I don't if you want to use Cocos2d with the UIKit framework or if you want use it as the main entry. If you want more details about these steps you can check the Ray Wenderlich blog's post.
希望对你有帮助.
这篇关于仅将 Cocos2D 添加到现有项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:仅将 Cocos2D 添加到现有项目?
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- Android - 拆分 Drawable 2022-01-01