Introduction
Many games have scenes bigger than screen.
snippet
Preview code
engine.moveCamera(12, 12);
code without import com.stencyl.behavior.Script.*
Engine.engine.moveCamera(12, 12);
computationa shortcut level 1
with removed position limiter (allows camera to go out of the scene) and and zooming
Engine.engine.camera.setLocation(x, y);
Engine.cameraX = Engine.engine.camera.realX - Engine.screenWidthHalf;
Engine.cameraY = Engine.engine.camera.realY - Engine.screenHeightHalf;
No comments:
Post a Comment