简体   繁体   English

有没有一种方法可以将在iOS和Android上运行的cocos2d-x项目转换为HTML而不将代码转换为JS?

[英]Is there a way to convert cocos2d-x project working on iOS and Android to convert it to html without converting the code to JS?

I have completed a project which is completed on iOS and Android with all native code like in-app purchases and leaderboard completed. 我已经完成了一个在iOS和Android上完成的项目,并完成了所有本机代码,例如应用内购买和排行榜。 I want to convert that project into HTML 5 but without changing my C++ code to javascript and using the same resources. 我想将该项目转换为HTML 5,但不将C ++代码更改为javascript并使用相同的资源。 Is there any method/way to convert my code? 有什么方法/方式可以转换我的代码?

I was a native obj-c programmer who joined cocos2d-x porting from cocos2d-iphone. 我是一个本地obj-c程序员,从cocos2d-iphone加入了cocos2d-x移植。 I have little/no knowledge of html or javascript. 我对html或javascript的了解很少/不了解。

If you want the resulting app to run within the browser, then no. 如果要使生成的应用程序在浏览器中运行,则否。 There's no cocos2d variant that makes this possible. 没有cocos2d变体使之成为可能。 You would have to port the app to a completely different (but still C++) framework. 您必须将应用程序移植到完全不同的(但仍然是C ++)框架。 See: How to build native C++ apps with HTML/CSS UI? 请参阅: 如何使用HTML / CSS UI构建本机C ++应用程序?

You can of course build a c++ app with cocos2d-x that presents a html5 view, but it won't run within the browser. 您当然可以使用cocos2d-x构建一个提供html5视图的c ++应用程序,但是它不会在浏览器中运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM