Defines a sprite component with control over its size, rotation, and scale
More...
|
| SpriteTransform (Texture2D texture, Vector2 position, Vector2 scale) |
| Initializes a new instance of the T:MB2D.EntityComponent.SpriteTransform class. More...
|
|
| SpriteTransform (TextureRegion2D texture, Vector2 position, Vector2 scale) |
| Initializes a new instance of the T:MB2D.EntityComponent.SpriteTransform class. More...
|
|
|
Sprite | Target [get, set] |
| Gets or sets the sprites target containing all of the applied data and logicd. More...
|
|
Vector2 | Direction [get] |
| Gets the sprites direction. More...
|
|
float | Rotation [get, set] |
| Gets or sets the rotation in radians. More...
|
|
RectangleF | Bounds [get, set] |
| Gets or sets the sprites bounding box. More...
|
|
float | Z [get, set] |
| Gets or sets the sprites z index. Used in depth systems. More...
|
|
Defines a sprite component with control over its size, rotation, and scale
§ SpriteTransform() [1/2]
MB2D.EntityComponent.SpriteTransform.SpriteTransform |
( |
Texture2D |
texture, |
|
|
Vector2 |
position, |
|
|
Vector2 |
scale |
|
) |
| |
|
inline |
Initializes a new instance of the T:MB2D.EntityComponent.SpriteTransform class.
- Parameters
-
texture | Texture to assign to the sprite. |
position | Initial position of the sprite. Should be the entities position for best practice. |
scale | Initial scale of the sprite. |
§ SpriteTransform() [2/2]
MB2D.EntityComponent.SpriteTransform.SpriteTransform |
( |
TextureRegion2D |
texture, |
|
|
Vector2 |
position, |
|
|
Vector2 |
scale |
|
) |
| |
|
inline |
Initializes a new instance of the T:MB2D.EntityComponent.SpriteTransform class.
- Parameters
-
texture | Texture region in a texture atlas to assign to the sprite. |
position | Initial position of the sprite. Should be the entities position for best practice. |
scale | Initial scale of the sprite. |
§ Bounds
RectangleF MB2D.EntityComponent.SpriteTransform.Bounds |
|
getset |
Gets or sets the sprites bounding box.
The bounds.
§ Direction
Vector2 MB2D.EntityComponent.SpriteTransform.Direction |
|
get |
Gets the sprites direction.
The direction.
§ Rotation
float MB2D.EntityComponent.SpriteTransform.Rotation |
|
getset |
Gets or sets the rotation in radians.
The rotation in radians.
§ Target
Sprite MB2D.EntityComponent.SpriteTransform.Target |
|
getset |
Gets or sets the sprites target containing all of the applied data and logicd.
The sprite target.
float MB2D.EntityComponent.SpriteTransform.Z |
|
getset |
Gets or sets the sprites z index. Used in depth systems.
The z index.
The documentation for this class was generated from the following file:
- MB2D/src/EntityComponent/Components/SpriteTransform.cs