将cocos 2d项目中的粒子导入到非cocos2d项目中
我已经在 cosos 2d 中创建了粒子,我想将粒子导入到我的真实项目(非 cocos2)项目中,我该怎么做?
I have created particle in cosos 2d and I want to import my particle into my real project (non cocos2) project, How can I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为这是不可能的,因为以下原因:
cocos 2d 库包含许多不同的类,这些类负责粒子、声音和效果等。
如果您想导入粒子,则需要导入整个库,这将使您的非 cocos2d 项目变成 cocos2d 项目。
不久前,我回答了一个关于在cocos2d之外创建粒子的问题,你可以检查一下它出来了。答案是生成图像,将它们添加到数组中并通过数组为它们设置动画。
你也可以用 openGLES 制作粒子,但这会有点困难......
I don't think it's possible because of the following:
The cocos 2d library contains lots of different classes that are responsible for things like particles, sounds and effects.
If you would like to import a particle, you would need to import the whole library which would make your non-cocos2d project into a cocos2d project.
Not too long ago, i answered a question about particle creation outside of cocos2d you might check it out. The answer is about spawning images, adding them to an array and animating them via the array.
You can also make particles with openGLES which would be a bit harder...