Shader like vectors for C# Scripting

This commit is contained in:
Simon Lübeß
2023-07-20 17:48:28 +02:00
parent f0de874572
commit 3e55a1614a
24 changed files with 1572 additions and 486 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ public class RigidBody2D : Component
/// <param name="force">The world force vector, usually in Newtons (N).</param>
/// <param name="point">The world position of the point of application.</param>
/// <param name="wakeUp">Wake up the body</param>
public void ApplyForce(Vector2 force, Vector2 point, bool wakeUp = true)
public void ApplyForce(float2 force, float2 point, bool wakeUp = true)
{
ScriptGlue.RigidBody2D_ApplyForce(Entity._uuid, force, point, wakeUp);
}
@@ -23,7 +23,7 @@ public class RigidBody2D : Component
/// </summary>
/// <param name="force">The world force vector, usually in Newtons (N).</param>
/// <param name="wakeUp">Wake up the body</param>
public void ApplyForceToCenter(Vector2 force, bool wakeUp = true)
public void ApplyForceToCenter(float2 force, bool wakeUp = true)
{
ScriptGlue.RigidBody2D_ApplyForceToCenter(Entity._uuid, force, wakeUp);
}
+2 -2
View File
@@ -5,11 +5,11 @@ namespace GlitchyEngine;
public class Transform : Component
{
public Vector3 Translation
public float3 Translation
{
get
{
ScriptGlue.Transform_GetTranslation(Entity.UUID, out Vector3 translation);
ScriptGlue.Transform_GetTranslation(Entity.UUID, out float3 translation);
return translation;
}
set