Available since:
4.0.0
Constructor
Variables
read only fullScaleX : Float
read only fullScaleY : Float
read only height : Float
pixelSnapping : Bool
Whether this graphic will be snapped to the nearest whole number pixel position when rendering. If this is true for either an individual Graphic or for the Camera, snapping will occur.
scale : Float
scaleX : Float
scaleY : Float
read only screenScaleX : Float
read only screenScaleY : Float
read only width : Float
x : Float
y : Float
Functions
anchor (target : Position, anchorX : Float = 0.5, anchorY : Float = 0.5) : Void
Anchor the Camera to an Entity or other object with position. The Camera will keep the target in the specified part of the screen.
Available since:
4.0.0
floorX (x : Float) : Float
Return an X value that, after scaling, will result in an integer.
floorY (y : Float) : Float
Return a Y value that, after scaling, will result in an integer.
setTo (x : Float, y : Float, px : Float = 0, py : Float = 0) : Void
Set the Camera's position. If provided, px and py determine the part of the screen to move to the given position; 0.5 will center the camera, and 1.0 will set the right edge.
shake (duration : Float = 0.5, magnitude : Int = 4) : Void
Cause the screen to shake for a specified length of time.
Parameters:
duration | Duration of shake effect, in seconds. | |
magnitude | Number of pixels to shake in any direction. |
Available since:
2.5.3