在Swift项目中整合Cocos2dx项目(XCode 6.3)

时间:2023-01-13 20:23:47

I have 2 separate Projects one is in Cocos2dx v3.6 and one is in Swift. I want to start a game from the Swift project. How can I do it?

我有两个独立的项目,一个在Cocos2dx v3.6中,另一个在Swift中。我想从Swift项目开始一个游戏。我该怎么做呢?

I have copied whole cocos2dx project into my Swift project and then created one View Controller in swift and trying to open CCDirector as a root view of the project. but not able to find director, I am trying to import cocos2dx with this #import "cocos2d.h" , but it is giving me error of "undefined file".

我将整个cocos2dx项目复制到我的Swift项目中,然后在Swift中创建了一个视图控制器,并试图打开CCDirector作为项目的根视图。但是找不到director,我正在用#import cocos2dx导入cocos2d。h,但是它给了我“未定义文件”的错误。

在Swift项目中整合Cocos2dx项目(XCode 6.3)

Apple Swift version 1.2

苹果迅速1.2版本

1 个解决方案

#1


2  

You can use version Cocos2d for Swift it is here. this

您可以使用Cocos2d版本的Swift it is here。这

Also I suggest you use this tutorial it is very simple todo.

我也建议您使用本教程,它非常简单。

#1


2  

You can use version Cocos2d for Swift it is here. this

您可以使用Cocos2d版本的Swift it is here。这

Also I suggest you use this tutorial it is very simple todo.

我也建议您使用本教程,它非常简单。