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

Renders a texture on an entity. More...

Inheritance diagram for WoopWoop.TextureRenderer:
WoopWoop.Renderer WoopWoop.Component

Public Member Functions

override void Start ()
 Called when the component starts.
 
void LoadImage (Image image)
 Loads a texture from an image.
 
void LoadFromPath (string filename)
 Loads a texture from a file path.
 
override void Update (float deltaTime)
 Updates the texture renderer.
 
override void Stop ()
 Called when the component stops.
 
- 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 OnEndOfFrame ()
 Called on the end of every frame.
 
virtual void OnDrawGizmo ()
 Tells the renderer how to draw the object's editor gizmos.
 

Public Attributes

Texture texture
 The texture to render.
 
- Public Attributes inherited from WoopWoop.Renderer
Color Color = Raylib.BLACK
 The color of the renderer.
 

Private Attributes

bool isTextureLoaded = false
 

Additional Inherited Members

- Static Protected Member Functions inherited from WoopWoop.Renderer
static Vector2 GetOriginalPositionOfTransform (Transform transform, Pivot pivot)
 Gets the original position of the transform based on the pivot.
 
- Properties inherited from WoopWoop.Renderer
byte Layer [get, set]
 The rendering layer of the renderer.
 
- 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.
 

Detailed Description

Renders a texture on an entity.

Member Function Documentation

◆ LoadFromPath()

void WoopWoop.TextureRenderer.LoadFromPath ( string filename)

Loads a texture from a file path.

Parameters
filenameThe path to the image file.

◆ LoadImage()

void WoopWoop.TextureRenderer.LoadImage ( Image image)

Loads a texture from an image.

Parameters
imageThe image to load the texture from.

◆ Start()

override void WoopWoop.TextureRenderer.Start ( )
virtual

Called when the component starts.

Reimplemented from WoopWoop.Component.

◆ Stop()

override void WoopWoop.TextureRenderer.Stop ( )
virtual

Called when the component stops.

Reimplemented from WoopWoop.Component.

◆ Update()

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

Updates the texture renderer.

Parameters
deltaTimeThe time elapsed since the last update.

Reimplemented from WoopWoop.Component.

Member Data Documentation

◆ isTextureLoaded

bool WoopWoop.TextureRenderer.isTextureLoaded = false
private

◆ texture

Texture WoopWoop.TextureRenderer.texture

The texture to render.


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