仅将 Cocos2D 添加到现有项目?

Adding Cocos2D only to already existing project?(仅将 Cocos2D 添加到现有项目?)
本文介绍了仅将 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:

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

  1. 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 添加到现有项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Why local notification is not firing for UNCalendarNotificationTrigger(为什么没有为UNCalendarNotificationTrigger触发本地通知)
iOS VoiceOver functionality changes with Bundle Identifier(IOS画外音功能随捆绑包标识符而变化)
tabbar middle tab out of tabbar corner(选项卡栏中间的选项卡角外)
Pushing UIViewController above UITabBar(将UIView控制器推送到UITabBar上方)
How can I sync two flatList scroll position in react native(如何在本机Reaction中同步两个平面列表滚动位置)
Get an event when UIBarButtonItem menu is displayed(显示UIBarButtonItem菜单时获取事件)