fix: last game update

This commit is contained in:
2024-06-12 15:56:21 +02:00
parent 58a6b03839
commit 47a21f293e
13 changed files with 54702 additions and 209248 deletions

View File

@@ -98,8 +98,8 @@ std::string SceneName()
float Time_DeltaTime()
{
if (app::Time_1_get_deltaTime) {
return app::Time_1_get_deltaTime(nullptr);
if (app::Time_get_deltaTime) {
return app::Time_get_deltaTime(nullptr);
}
return 0.0f;

View File

@@ -3,7 +3,7 @@
#include "UnityEngine/Math.h"
#include <helpers.h>
const char* Math::Vector3::ToString(app::Vector3* v)
const char* Math::Vector3::ToString(app::Vector3__Boxed* v)
{
app::String* str = app::Vector3_ToString(v, nullptr);
@@ -14,3 +14,17 @@ const char* Math::Vector3::ToString(app::Vector3 v)
{
return ("x: " + std::to_string(v.x) + " y: " + std::to_string(v.y) + " z: " + std::to_string(v.z)).c_str();
}
namespace app {
Vector3 operator+(const Vector3& lhs, const Vector3& rhs) {
return { lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z };
}
Vector3 operator*(const Vector3& vec, float scalar) {
return { vec.x * scalar, vec.y * scalar, vec.z * scalar };
}
Vector3 operator-(const Vector3& lhs, const Vector3& rhs) {
return { lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z };
}
}

View File

@@ -33,7 +33,7 @@ app::Vector3 Transform::GetRight(app::Transform* transform)
return app::Transform_get_right(transform, nullptr);
}
app::Vector3 Transform::GetEulerAngles(app::Quaternion rotation)
app::Vector3 Transform::GetEulerAngles(app::Quaternion__Boxed rotation)
{
return app::Quaternion_get_eulerAngles(&rotation, nullptr);
}

View File

@@ -2,7 +2,13 @@
namespace Math {
namespace Vector3 {
const char* ToString(app::Vector3* v);
const char* ToString(app::Vector3__Boxed* v);
const char* ToString(app::Vector3 v);
}
}
}
namespace app {
Vector3 operator+(const Vector3& lhs, const Vector3& rhs);
Vector3 operator*(const Vector3& vec, float scalar);
Vector3 operator-(const Vector3& lhs, const Vector3& rhs);
}

View File

@@ -11,7 +11,7 @@ namespace Transform {
app::Quaternion GetRotation(app::Transform* transform);
app::Vector3 GetForward(app::Transform* transform);
app::Vector3 GetRight(app::Transform* transform);
app::Vector3 GetEulerAngles(app::Quaternion rotation);
app::Vector3 GetEulerAngles(app::Quaternion__Boxed rotation);
app::Quaternion QuaternionEuler(app::Vector3 eulerAngles);
app::Quaternion QuaternionIdentity();