电晕动画
我怎样才能在我的移动物体上执行动画...... 当某些物体允许碰撞而另一些物体不允许碰撞时,我该如何控制碰撞...我也是电晕和编码的初学者...我查看了我知道的所有示例,其中有我的问题的答案,但我无法理解正确的是...所以有人帮助我吗?
how can i perform animation on my moving object....
and how can i control collisions when some of objects are allowed to collide and some not...i,m beginner to corona and coding as well ...i look all the examples i know there r answers of my questions but i cant understand that properly...so any one help me??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在 Corona 中,当您创建物理主体时,您可以指定主体类型:静态、运动学和动态。
静态物体不会移动,也不会相互作用;静态物体的例子包括地面或弹球机的墙壁。
动态物体会受到重力以及与其他物体类型的碰撞的影响。
运动对象介于动态和静态主体之间,但不会响应重力
有关更多信息,请检查以下链接:http://developer.anscamobile.com/content/game-edition-physicals-bodies 和 http://developer.anscamobile.com/reference/index/physicalsaddbody
In Corona when you create a Physics body you can specify the body type: static, kinematic, and dynamic.
Static bodies don't move, and don't interact with each other; examples of static objects would include the ground, or the walls of a pinball machine.
Dynamic bodies are affected by gravity and collisions with the other body types.
Kinematic objects are in-between Dynamic and Static bodies but doesn't response to gravity
For more information check these links: http://developer.anscamobile.com/content/game-edition-physics-bodies and http://developer.anscamobile.com/reference/index/physicsaddbody
通过“动画”,我假设您的意思是图形发生变化。在这种情况下,您应该使用 Spritesheet:
http://developer.anscamobile.com/reference/sprite-sheets
至于碰撞,我会再次做出假设,因为你的问题有点模糊。我将您的问题解释为想知道如何在某些对象不相互碰撞的情况下设置碰撞,为此您需要设置类别和掩码位:
http://developer.anscamobile.com/content/game-edition-collision -检测#Collision_categories_masking_and_groups
By "animation" I'm going to assume you mean that the graphic changes. In that case you should use a Spritesheet:
http://developer.anscamobile.com/reference/sprite-sheets
As for collisions, there again I'll make an assumption because your question is a little vague. I interpret your question as wondering how to setup collisions where some objects don't collide with each other, and for that you want to set category and mask bits:
http://developer.anscamobile.com/content/game-edition-collision-detection#Collision_categories_masking_and_groups
使用corona sdk制作动画非常容易。如果使用精灵表动画,您可以使用此链接 http://docs.coronalabs.com/api/library/display/newSprite.html。
It is very easy to make a animation by using corona sdk.If using sprite sheet animation u have use this link http://docs.coronalabs.com/api/library/display/newSprite.html.