Coder Social home page Coder Social logo

cocostest's Introduction

#向iOS工程中添加cocos工程

大致思路

我的解决方案的大致思路是这样的:将cocos引擎添加到iOS工程中,在合适的位置进入cocos游戏界面。

步骤

向iOS工程中加入文件

首先按cocos官网上的方法生成cocos工程,向iOS工程中添加cocos工程中的Classes/、proj.ios_mac/ios/、resources复制到iOS工程的文件夹中。向工程中添加文件:Classes/、ios/、cocos2d/build/cocos2d_libs.xcodeproj。

更改工程设置

1.向工程中添加如图所示的库 Markdown 2.向 Building Setting>Header Search Paths 中添加项 Markdown 3.在 Building Setting 中更改工程设置 Markdown Markdown 4.删除原工程的 main.m、AppDelegate.h/m 文件

更改工程入口

具体设置参照博客,大致的思路就是修改cocos工程的入口AppController文件,在需要嵌入游戏的位置初始化RootViewController即可。

cocostest's People

Contributors

fuzesunshine avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ccczone

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.