问题
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:
回答1:
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
来源:https://stackoverflow.com/questions/8556105/lime-for-corona-sdk-camera-focus-on-layer