Issue with Priority when objects overlap

南楼画角 提交于 2019-12-11 11:42:36

问题


I have 2 object Object1 and Object2

When I use

transition.to(Object1,{time=1000,x=Object2.x,y = Object2.y})

Object1 will be above Object2. If I want Object2 to be above Object1, how can I do?

Thanks for all answers!


回答1:


You can use object:toFront to move Object2 to front.

Something like this:

Object2:toFront()

Note: this not only moves Object2 in front of Object1 but in front of all other siblings. If you want more control about displaying you need to built it yourself :)



来源:https://stackoverflow.com/questions/22761950/issue-with-priority-when-objects-overlap

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!