Scripting API
Scripting API
WorldCameras
Struct in Abyss.Core, from Abyss.Core.
Cameras, as a game moves them from its code beyond what their components say: shaken for a hit or a boss's slam.
public readonly struct WorldCamerasRemarks
A camera with a Camera Follow 2D follows its Target while the game plays, kept inside the Camera Bounds 2D box the target is in; a shake moves it about where it follows. See abyss_core::camera_follow.
Constructors
WorldCameras
public WorldCameras(World world)Cameras, as a game moves them from its code beyond what their components say: shaken for a hit or a boss's slam.
Parameters
world: The world they are in.
A camera with a Camera Follow 2D follows its Target while the game plays, kept inside the Camera Bounds 2D box the target is in; a shake moves it about where it follows. See abyss_core::camera_follow.
Methods
Shake
public void Shake(ulong camera, float strength, float seconds = 0.4)Shakes camera about where it is as far as strength units at most, less as it fades over seconds; a Pixel Perfect Camera by whole art pixels. A stronger shake than the one going on takes over from it, and a weaker one does nothing. It moves the camera only while the game plays.
Parameters
camera: The camera, by its entity.strength: How far it moves at most as it starts, in units.seconds: How long it lasts.
Exceptions
AbyssException:AbyssStatus.MalformedEntityIdfor bits that pack no entity,AbyssStatus.EntityNotFoundfor one that is gone, andAbyssStatus.InvalidCameraEffectfor one that is no camera, or a strength or a number of seconds that is not one.
