camera

PP. camera

The namespace containing functions for the management of the camera.
Source:

Methods

(static) get_scroll_x(s)

Return the scroll on the x axis of the camera. They represent the distance between the top-left of the camera's world view and its viewport.
Source:
Parameters:
Name Type Description
s object The scene object.

(static) get_scroll_y(s)

Return the scroll on the y axis of the camera. They represent the distance between the top-left of the camera's world view and its viewport.
Source:
Parameters:
Name Type Description
s object The scene object.

(static) set_follow_offset(scene, offset_x, offset_y)

Change the offset of the camera.
Source:
Parameters:
Name Type Description
scene object The scene object.
offset_x number Offset X in pixels
offset_y number Offset Y in pixels

(static) start_follow(scene, obj, offset_x, offset_y)

Make the camera following an object.
Source:
Parameters:
Name Type Description
scene object The scene object.
obj object The object to follow (sprite, image, etc.).
offset_x number Offset X of the object to follow
offset_y number Offset Y of the object to follow