Class Transform
Transform component for the entity. The engine enforces the existance of this component for all entities.
Namespace: Chroma
Assembly: Chroma.Mono.dll
Syntax
public class Transform : Component
Properties
Position
Positional component for the transform. Represents the position of the entity in the scene.
Declaration
public Vector2 Position { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
RadRotation
Rotational component for the transform in radians.
Use Rotation
for accessing rotation in degrees.
Declaration
public float RadRotation { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Rotation
Rotational component for the transform. Represents the euler angle in degrees of the entity.
Rotation is internally stored in radians and is converted in this geter/setter.
Use RadRotation
for accessing the rotation in radians.
Declaration
public float Rotation { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Scale
Scale component of the transform.
Declaration
public Vector2 Scale { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
Methods
ToString()
Gets the transform component as a string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | Formatted string containing transform data. |
Overrides
System.Object.ToString()