WoopWoop-Docs
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Properties | Private Attributes | Static Private Attributes | List of all members
WoopWoop.Camera Class Reference

Represents a camera that can be used to view the scene. More...

Inheritance diagram for WoopWoop.Camera:
WoopWoop.Component

Public Member Functions

override void Start ()
 Called when the component starts.
 
override void Update (float deltaTime)
 Called every frame.
 
override void OnEndOfFrame ()
 Called at the end of each frame.
 
- Public Member Functions inherited from WoopWoop.Component
void Attach (Entity entity)
 Attaches the component to an entity.
 
virtual void Awake ()
 Awake is called when the component is initialized, regardless of whether or not the script is enabled.
 
virtual void Stop ()
 Called when the component is removed.
 
virtual void OnDrawGizmo ()
 Tells the renderer how to draw the object's editor gizmos.
 

Static Public Member Functions

static Camera Main ()
 Gets the main camera.
 

Public Attributes

Camera2D camera
 The 2D camera.
 
int width
 The width of the camera.
 
int height
 
Color backgroundColor = Raylib.WHITE
 The background color of the camera view.
 
readonly float centerX = WoopWoopEngine.screenWidth / 2
 The center X position of the camera.
 
readonly float centerY = WoopWoopEngine.screenHeight / 2
 The center Y position of the camera.
 

Properties

bool IsMain [get, set]
 Indicates whether this camera is the main camera.
 
- Properties inherited from WoopWoop.Component
Entity entity [get, private set]
 The entity to which this component is attached.
 
Transform transform [get]
 The transform of the entity to which this component is attached.
 
bool Enabled = true [get, set]
 Determines whether the component is enabled.
 

Private Attributes

bool isMain = false
 

Static Private Attributes

static Camera mainCamera
 

Detailed Description

Represents a camera that can be used to view the scene.

Member Function Documentation

◆ Main()

static Camera WoopWoop.Camera.Main ( )
static

Gets the main camera.

Returns
The main camera.

◆ OnEndOfFrame()

override void WoopWoop.Camera.OnEndOfFrame ( )
virtual

Called at the end of each frame.

Reimplemented from WoopWoop.Component.

◆ Start()

override void WoopWoop.Camera.Start ( )
virtual

Called when the component starts.

Reimplemented from WoopWoop.Component.

◆ Update()

override void WoopWoop.Camera.Update ( float deltaTime)
virtual

Called every frame.

Parameters
deltaTimeThe time elapsed since the last frame.

Reimplemented from WoopWoop.Component.

Member Data Documentation

◆ backgroundColor

Color WoopWoop.Camera.backgroundColor = Raylib.WHITE

The background color of the camera view.

◆ camera

Camera2D WoopWoop.Camera.camera

The 2D camera.

◆ centerX

readonly float WoopWoop.Camera.centerX = WoopWoopEngine.screenWidth / 2

The center X position of the camera.

◆ centerY

readonly float WoopWoop.Camera.centerY = WoopWoopEngine.screenHeight / 2

The center Y position of the camera.

◆ height

int WoopWoop.Camera.height

◆ isMain

bool WoopWoop.Camera.isMain = false
private

◆ mainCamera

Camera WoopWoop.Camera.mainCamera
staticprivate

◆ width

int WoopWoop.Camera.width

The width of the camera.

Property Documentation

◆ IsMain

bool WoopWoop.Camera.IsMain
getset

Indicates whether this camera is the main camera.


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