在电晕中移动场景 [英] Move Scene in corona

查看:99
本文介绍了在电晕中移动场景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是刚接触电晕和我的问题编号的人,我的场景很长,而且我的身体是球形的。当它向上移动时,我想向上移动场景。

I am new to corona and my Problem id I have a long scene and in that I have a ball body. When it moves up i want to move the scene up. How to do this in Corona.

推荐答案

使用显示组包含整个场景(关卡,球)来完成此操作,一切),然后移动该显示组。因此,科罗娜(Corona)的物理在显示组之间不起作用,因此您可以移动场景而不会影响场景内部的物理。请参考鸡蛋破碎机示例项目。

This is done using a display group to contain your entire scene (the level, the ball, everything) and then move that display group. Physics in Corona don't work between display groups for this very reason, so that that you can move the scene without affecting physics inside the scene. Refer to the "Egg Breaker" sample project.

这篇关于在电晕中移动场景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆