Liona for Corona SDK-相机专注于图层 [英] Lime for Corona SDK - Camera focus on layer
问题描述
在Lime框架中是否有任何解决方案可以将重点放在图层上. 我想在带有滚动背景(相机)的名为"keepie uppie"的游戏中使用此功能. 当您击球时,整个框架连同球和网球拍一起向上移动.
Is there any solution for setting up focus on layer in Lime framework. I would like to use this on game called "keepie uppie" with scrolling background (camera). When you hit the ball the entire frame together with a ball and tennis racket moves up.
下图显示了我想如何使其工作:
The figure below shows how I would like to make it work:
推荐答案
从Lime中检出相机.它基本上会创建一个显示组并相对于此移动所有内容.您可以将相机聚焦在您的一个游戏对象上. github回购中包含一个执行此操作的示例.
Check out the Camera from Lime. It basically creates a display group and moves everything relative to that. You can focus the camera on one of your game objects. The github repo includes an example of doing just that.
https://github.com/GrahamRanson/Camera
这篇关于Liona for Corona SDK-相机专注于图层的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!