mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Scripting: Added Set and GetPosition to Rigidbody2D
+ Vectors: Hide swizzles in Debugger + Generate ToString
This commit is contained in:
@@ -27,4 +27,20 @@ public class Rigidbody2D : Component
|
||||
{
|
||||
ScriptGlue.RigidBody2D_ApplyForceToCenter(Entity._uuid, force, wakeUp);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the position of the rigidbody.
|
||||
/// </summary>
|
||||
/// <param name="position">The position of the rigidbody.</param>
|
||||
public void SetPosition(float2 position)
|
||||
{
|
||||
ScriptGlue.RigidBody2D_SetPosition(Entity._uuid, position);
|
||||
}
|
||||
|
||||
public float2 GetPosition()
|
||||
{
|
||||
ScriptGlue.RigidBody2D_GetPosition(Entity._uuid, out float2 position);
|
||||
|
||||
return position;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user