mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
ScriptCore: Added more properties to components
- Added CircleRenderer - Transform: Added Rotation, RotationEuler, RotationAxisAngle and Scale - RigidBody: Added BodyType and GravityScale - Added ColorRGBA
This commit is contained in:
@@ -101,4 +101,34 @@ public class Rigidbody2D : Component
|
||||
}
|
||||
set => ScriptGlue.Rigidbody2D_SetFixedRotation(_uuid, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the body type of the rigidbody.
|
||||
/// </summary>
|
||||
public BodyType BodyType
|
||||
{
|
||||
get
|
||||
{
|
||||
ScriptGlue.Rigidbody2D_GetBodyType(_uuid, out BodyType bodyType);
|
||||
|
||||
return bodyType;
|
||||
}
|
||||
set => ScriptGlue.Rigidbody2D_SetBodyType(_uuid, value);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the gravity scale of this rigidbody.
|
||||
/// E.g. a value of 0.0 means, that the rigidbody is not affected by gravity and a value of -1.0 means, that it gravity is inverted.
|
||||
/// </summary>
|
||||
public float GravityScale
|
||||
{
|
||||
get
|
||||
{
|
||||
ScriptGlue.Rigidbody2D_GetGravityScale(_uuid, out float gravityScale);
|
||||
|
||||
return gravityScale;
|
||||
}
|
||||
set => ScriptGlue.Rigidbody2D_SetGravityScale(_uuid, value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user