Midnight Blue Game and Engine
Public Member Functions | Properties | List of all members
MB2D.EntityComponent.SpriteTransform Class Reference

Defines a sprite component with control over its size, rotation, and scale More...

Inheritance diagram for MB2D.EntityComponent.SpriteTransform:
Inheritance graph
Collaboration diagram for MB2D.EntityComponent.SpriteTransform:
Collaboration graph

Public Member Functions

 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...
 

Properties

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...
 

Detailed Description

Defines a sprite component with control over its size, rotation, and scale

Constructor & Destructor Documentation

§ 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
textureTexture to assign to the sprite.
positionInitial position of the sprite. Should be the entities position for best practice.
scaleInitial 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
textureTexture region in a texture atlas to assign to the sprite.
positionInitial position of the sprite. Should be the entities position for best practice.
scaleInitial scale of the sprite.

Property Documentation

§ 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.

§ Z

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: