feat(battle-engine): seed copy roots + UnityEngine primitive shim
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
35
SVSim.BattleEngine/Shim/UnityEngine/Primitives.cs
Normal file
35
SVSim.BattleEngine/Shim/UnityEngine/Primitives.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
// AUTHORED SHIM (not copied). Minimal no-op UnityEngine surface. Grows via the
|
||||
// Task 4 compile loop -- add only members the compiler actually demands.
|
||||
namespace UnityEngine
|
||||
{
|
||||
public struct Vector2 { public float x, y; public Vector2(float x, float y){ this.x=x; this.y=y; } }
|
||||
public struct Vector3
|
||||
{
|
||||
public float x, y, z;
|
||||
public Vector3(float x, float y, float z){ this.x=x; this.y=y; this.z=z; }
|
||||
public static Vector3 zero => new Vector3(0,0,0);
|
||||
public static Vector3 operator +(Vector3 a, Vector3 b) => new Vector3(a.x+b.x, a.y+b.y, a.z+b.z);
|
||||
}
|
||||
public struct Quaternion
|
||||
{
|
||||
public float x, y, z, w;
|
||||
public static Quaternion identity => new Quaternion();
|
||||
public static Quaternion Euler(float x, float y, float z) => new Quaternion();
|
||||
}
|
||||
public struct Color { public float r, g, b, a; public Color(float r,float g,float b,float a){ this.r=r; this.g=g; this.b=b; this.a=a; } }
|
||||
public static class Mathf
|
||||
{
|
||||
public const float PI = 3.14159265f;
|
||||
public static float Floor(float f) => (float)System.Math.Floor(f);
|
||||
public static int FloorToInt(float f) => (int)System.Math.Floor(f);
|
||||
public static float Max(float a, float b) => System.Math.Max(a, b);
|
||||
public static float Min(float a, float b) => System.Math.Min(a, b);
|
||||
public static float Clamp(float v, float lo, float hi) => System.Math.Max(lo, System.Math.Min(hi, v));
|
||||
}
|
||||
public static class Debug
|
||||
{
|
||||
public static void Log(object m) { }
|
||||
public static void LogWarning(object m) { }
|
||||
public static void LogError(object m) { }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user