仅将Cocos2D添加到已存在的项目中? [英] Adding Cocos2D only to already existing project?

查看:220
本文介绍了仅将Cocos2D添加到已存在的项目中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经有一个项目是90%完成,我想添加Cocos2D只。我不需要Box2D或Chipmunk。我该怎么做?我要添加什么文件?



谢谢!

解决方案

要开始将Cocos2d添加到项目中的更简单的方法是遵循以下行:


  1. 将Cocos2d文件导入到您的项目中,如下所示:

  2. 然后导入位于external文件夹中的FontLabel文件夹(进入Cocos2d库)。

    / li>
  3. 之后,您必须将OpenGLES和QuartzCore框架链接到您的项目:


  4. 在项目导航器中选择目标并打开


  5. 将-lz标志添加到其他链接器标志中:


没有它应该编译正确。



但是,如果你想使用Cocos2d与UIKit框架或如果你想使用它作为主条目。
如果您想了解这些步骤的详细信息,您可以检查 Ray Wenderlich博客的帖子



我希望它会帮助你。


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.

Thanks!

解决方案

To start the easier way to add Cocos2d into your project is to follow these lines:

  1. Import the Cocos2d files into your project like the picture below:

  2. Then import the "FontLabel" folder which is located into the "external" folder (Into the Cocos2d library) like the previous step.

  3. After, you have to link the OpenGLES and QuartzCore frameworks with your project:

  4. Next in the "Project navigator", select your target and open the "Build Settings" tab.

  5. Add the -lz flag into the "Other Linker Flags":

That's all! No it should compile properly.

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.

I hope it'll help you.

这篇关于仅将Cocos2D添加到已存在的项目中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆