Sprite Renderer - Wantcha/Chimera GitHub Wiki

Sprite Renderer Component

SpriteRendererComponent is a variable type controlling the parameters of a Sprite Renderer. It can be retrieved from an entity using the GetSpriteRendererComponent() function.

SpriteRendererComponent

- Vector4 SpriteRendererComponent.color

Color of the sprite. If the sprite has a texture, this color will be multiplied on top of it.

- Texture2D SpriteRendererComponent.texture

Texture object of the sprite.

Texture2D

Object representing a 2D texture.

- Texture2D Texture2D.Create(string path) ! NOT CURRENTLY WORKING !

Creates and returns a Texture2D object from a given path (relative to the "assets" folder)

- int Texture2D.GetBoundsWidth()

Returns the width in world units.

- int Texture2D.GetBoundsHeight()

Returns the height in world units.

- int Texture2D.GetWidth()

Returns the width in pixels of a texture.

- int Texture2D.GetHeight()

Returns the height in pixels of a texture.