iOS开发后学习使用Cocos2D for android
我刚刚使用 cocos2D 创建了一个 iOS 游戏,现在正在尝试使用 eclipse 学习 android 开发和 cocos2D。我已将 cocos2D .jar 文件导入到 android 项目中,但这没有像在 XCode 中编程那样好的文档。谁能给我提供一个关于如何将 cocos2D 源代码导入到我的 android 项目中的简单演练,以便我可以在编写代码时查看 javadoc?
我在论坛上找到了这个
---尝试下载 Cocos2D 的源文件并将它们直接添加到您的项目中(将“org”文件夹复制到“src”文件夹中,然后在项目资源管理器中选择 src 文件夹时按 F5 ),确保删除对 jar 文件的引用。这应该可以解决任何缺失的功能,同时在输入 Cocos2D 代码时为您提供额外的帮助(Eclipse 将自动为您显示 javadoc 注释)。---
我假设这是源代码: https://github.com/ZhouWeikuan/cocos2d/tree/master/cocos2d-android 但我没有看到任何 org 文件夹,并且非常感谢总体上更好的演练。
有人可以帮忙吗?我真的很希望 javadoc 能够帮助我完成学习过程。
聚苯乙烯 我是论坛的新手,也许这本身应该是一个新问题,但是我当前使用的 .jar 文件是从 http://code.google.com/p/cocos2d-android-1/downloads/detail?name=cocos2d-android.jar&can=2&q= 但我似乎缺少一些实现,例如 CGRectIntersectsRect 和 CCTMXTiledMap。这是一个过时的 .jar 吗?不是最新的,可以使用源代码修复吗?我已经看到了两者用于 android 的示例,所以我知道它们是在 android 的 cocos2d 的某些修订版中实现的。
任何帮助或建议将不胜感激。
I just got done creating a game for iOS using cocos2D and am now trying to learn android development and cocos2D using eclipse. I've imported the cocos2D .jar file into the android project, but this has no nice documentation like it does programming in XCode. Could anyone provide me with a simple walkthrough on how to import the cocos2D source code into my android project so that I can view the javadoc while I write code?
I found this on a forum
---Try downloading the source files for Cocos2D and directly adding them to your project (copy the ‘org’ folder into your ‘src’ folder, then press F5 while the src folder is selected in the project explorer), making sure to remove the reference to the jar file. This should resolve any missing functionality, while giving you extra help when typing in Cocos2D code (Eclipse will automatically display the javadoc comments for you).---
I assume this is the source code: https://github.com/ZhouWeikuan/cocos2d/tree/master/cocos2d-android
but I don't see any org folder, and would greatly appreciate a better walkthrough in general.
Could anybody help? I would really like to have the javadoc to help me through the learning curve.
P.S.
I'm new to the forum, and maybe this should be a new question of itself, but the .jar file I'm currently using I downloaded from http://code.google.com/p/cocos2d-android-1/downloads/detail?name=cocos2d-android.jar&can=2&q=
but I seem to be missing some implementation such as CGRectIntersectsRect and CCTMXTiledMap. Is this an outdated .jar that not up to date and something that would be fixed using the source code? I have seen examples of both used for android so I know they are implemented in some revision of cocos2d for android.
Any help or advice would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您正在谈论的 org 文件夹包含在此处
https://github.com/ZhouWeikuan/cocos2d/tree/master/cocos2d -android/src
下载整个项目,然后将 org 文件夹复制到 eclipse 中的 src 文件夹
这是一个很好的入门教程 http://dan.clarke.name/2011/04/how-to-make-a-simple-android-game-with-cocos2d/
这是一件好事,这样你就可以找出小的差异在 cocos2d-iphone 和 cocos2d-android 之间,只需按照第一个教程就可以了
the org folder you are talking about is included in here
https://github.com/ZhouWeikuan/cocos2d/tree/master/cocos2d-android/src
download the whole project then just copy the org folder to your src folder in eclipse
this is a nice tutorial for starting http://dan.clarke.name/2011/04/how-to-make-a-simple-android-game-with-cocos2d/
it's a good thing to do so you can figure out the small differences between the cocos2d-iphone and cocos2d-android , just following the first tutorial should do it for you