Camera Constructor wrapper for GameMaker Studio 2.3.2+.
This is just a drop in for most of the camera_*
functions presented in GameMaker Studio 2 as methods via a constructor, as .PascalCase()
.
It also outright removes having to supply a cameraID for every method. Leaving it down to just providing the arguments.
Most of the methods are chainable as well.
// Creates a new Lens instance. Each instance carries its own cameraID.
cam = new Lens();
cam.SetViewCam(0).SetViewPos(32,32).SetViewSize(1280,720).Apply();
While most of it is pretty much plug in play (without having to supply CameraID), there's a few extra methods included.
Returns: an array that contains the results from .GetViewSpeedX()
and .GetViewSpeedY()
Returns: CameraID
Basically the same as view_camera[view_num] = camID
. but internally tracks the cameraID for when .free()
is called.
Frees the internal cameraID.
Returns an array with ViewX, ViewY, ViewX + ViewW, ViewY + ViewH.