Mod Helpers  v5.9.6
A centralized collection of library code, helpful services, and end-user functions for mod management and information.
HamstarHelpers.Services.Camera.Camera Class Reference

Supplies a set of controls for manipulating the player's 'camera' (screen position). More...

Inheritance diagram for HamstarHelpers.Services.Camera.Camera:
HamstarHelpers.Classes.Loadable.ILoadable HamstarHelpers.Classes.Loadable.ILoadable HamstarHelpers.Classes.Loadable.ILoadable

Static Public Member Functions

static void ApplyOffset (int offsetX, int offsetY)
 Shifts the camera from its current position by the given offset. More...
 
static void ApplyPosition (int? worldX, int? worldY)
 Positions the camera statically somewhere in the world.. More...
 
static void ApplyShake (float magnitude)
 Applies a shaking motion to the camera. More...
 
static void ApplyZoom (float scale)
 Applies zoom to the camera. More...
 
static void ResetOffset ()
 Resets camera shift. More...
 
static void ResetPosition ()
 Resets camera position. More...
 
static void ResetShake ()
 Reset shaking motion to the camera. More...
 
static void ResetZoom ()
 Resets zoom of the camera. More...
 

Static Public Attributes

static Camera Instance => ModContent.GetInstance<Camera>()
 

Properties

int? WorldPositionX = null [get]
 
int? WorldPositionY = null [get]
 
int OffsetX = 0 [get]
 
int OffsetY = 0 [get]
 
float ShakeMagnitude = 0f [get]
 
float ZoomScale = -1 [get]
 

Additional Inherited Members

Detailed Description

Supplies a set of controls for manipulating the player's 'camera' (screen position).

Definition at line 10 of file Camera.cs.

Member Function Documentation

◆ ApplyOffset()

static void HamstarHelpers.Services.Camera.Camera.ApplyOffset ( int  offsetX,
int  offsetY 
)
static

Shifts the camera from its current position by the given offset.

Parameters
offsetX
offsetY

Definition at line 16 of file Camera.cs.

◆ ApplyPosition()

static void HamstarHelpers.Services.Camera.Camera.ApplyPosition ( int?  worldX,
int?  worldY 
)
static

Positions the camera statically somewhere in the world..

Parameters
worldXnull uses current screen position.
worldYnull uses current screen position.

Definition at line 28 of file Camera.cs.

◆ ApplyShake()

static void HamstarHelpers.Services.Camera.Camera.ApplyShake ( float  magnitude)
static

Applies a shaking motion to the camera.

Parameters
magnitude

Definition at line 39 of file Camera.cs.

◆ ApplyZoom()

static void HamstarHelpers.Services.Camera.Camera.ApplyZoom ( float  scale)
static

Applies zoom to the camera.

Parameters
scale

Definition at line 49 of file Camera.cs.

◆ ResetOffset()

static void HamstarHelpers.Services.Camera.Camera.ResetOffset ( )
static

Resets camera shift.

Definition at line 64 of file Camera.cs.

◆ ResetPosition()

static void HamstarHelpers.Services.Camera.Camera.ResetPosition ( )
static

Resets camera position.

Definition at line 74 of file Camera.cs.

◆ ResetShake()

static void HamstarHelpers.Services.Camera.Camera.ResetShake ( )
static

Reset shaking motion to the camera.

Definition at line 84 of file Camera.cs.

◆ ResetZoom()

static void HamstarHelpers.Services.Camera.Camera.ResetZoom ( )
static

Resets zoom of the camera.

Definition at line 93 of file Camera.cs.

Member Data Documentation

◆ Instance

Camera HamstarHelpers.Services.Camera.Camera.Instance => ModContent.GetInstance<Camera>()
static

Definition at line 12 of file Camera_Instance.cs.

Property Documentation

◆ OffsetX

int HamstarHelpers.Services.Camera.Camera.OffsetX = 0
get

Definition at line 31 of file Camera_Instance.cs.

◆ OffsetY

int HamstarHelpers.Services.Camera.Camera.OffsetY = 0
get

Definition at line 34 of file Camera_Instance.cs.

◆ ShakeMagnitude

float HamstarHelpers.Services.Camera.Camera.ShakeMagnitude = 0f
get

Definition at line 40 of file Camera_Instance.cs.

◆ WorldPositionX

int? HamstarHelpers.Services.Camera.Camera.WorldPositionX = null
get

Definition at line 24 of file Camera_Instance.cs.

◆ WorldPositionY

int? HamstarHelpers.Services.Camera.Camera.WorldPositionY = null
get

Definition at line 27 of file Camera_Instance.cs.

◆ ZoomScale

float HamstarHelpers.Services.Camera.Camera.ZoomScale = -1
get

Definition at line 46 of file Camera_Instance.cs.


The documentation for this class was generated from the following files: