diff --git a/SVSim.BattleEngine/Shim/UnityEngine/UnityShim.cs b/SVSim.BattleEngine/Shim/UnityEngine/UnityShim.cs index 4ebcc3d..8187608 100644 --- a/SVSim.BattleEngine/Shim/UnityEngine/UnityShim.cs +++ b/SVSim.BattleEngine/Shim/UnityEngine/UnityShim.cs @@ -233,7 +233,7 @@ namespace UnityEngine public class ParticleSystemRenderer : Renderer { } public class LODGroup : Component { } public class Collider : Component { public bool enabled { get; set; } } - public class BoxCollider : Collider { } + public class BoxCollider : Collider { public Vector3 size { get; set; } public Vector3 center { get; set; } public bool isTrigger { get; set; } } public class Rigidbody : Component { } public class Rigidbody2D : Component { } public class Material : Object @@ -268,7 +268,13 @@ namespace UnityEngine public class Mesh : Object { public Vector3[] vertices { get; set; } public int[] triangles { get; set; } public void Clear() { } public void RecalculateBounds() { } } public class Texture : Object { public int width => 0; public int height => 0; } public class Texture2D : Texture { public Texture2D(int w, int h) { } public void Apply() { } public Color GetPixel(int x, int y) => Color.white; public void SetPixel(int x, int y, Color c) { } } - public class RenderTexture : Texture { public RenderTexture(int w, int h, int depth) { } public RenderTexture(int w, int h, int depth, RenderTextureFormat fmt) { } public void Create() { } public void Release() { } public bool IsCreated() => false; public static RenderTexture active { get; set; } } + public enum FilterMode { Point, Bilinear, Trilinear } + public enum TextureWrapMode { Repeat, Clamp, Mirror, MirrorOnce } + public enum WrapMode { Once = 1, Loop = 2, PingPong = 4, Default = 0, ClampForever = 8, Clamp = 1 } + public struct Keyframe { public float time; public float value; public Keyframe(float t, float v) { time = t; value = v; } } + public struct AnimatorStateInfo { public bool IsName(string name) => false; public float normalizedTime => 0f; public int shortNameHash => 0; public float length => 0f; } + public struct AnimatorClipInfo { public AnimationClip clip => null; public float weight => 0f; } + public class RenderTexture : Texture { public RenderTexture(int w, int h, int depth) { } public RenderTexture(int w, int h, int depth, RenderTextureFormat fmt) { } public void Create() { } public void Release() { } public bool IsCreated() => false; public static RenderTexture active { get; set; } public int depth { get; set; } public FilterMode filterMode { get; set; } public TextureWrapMode wrapMode { get; set; } public void DiscardContents() { } public static RenderTexture GetTemporary(int w, int h) => null; public static RenderTexture GetTemporary(int w, int h, int depth) => null; public static RenderTexture GetTemporary(int w, int h, int depth, RenderTextureFormat fmt) => null; public static void ReleaseTemporary(RenderTexture rt) { } } public class Sprite : Object { public Rect rect => default; public Texture2D texture => null; public static Sprite Create(Texture2D t, Rect r, Vector2 pivot) => null; } public class Shader : Object { public static Shader Find(string n) => null; public bool isSupported => true; } public class AnimationClip : Object { public float length => 0f; public string name { get; set; } } @@ -282,8 +288,12 @@ namespace UnityEngine public void Play(string n) { } public void Play(int hash) { } public void SetLayerWeight(int layer, float w) { } public float speed { get; set; } public bool enabled { get; set; } + public void ResetTrigger(string n) { } public void ResetTrigger(int id) { } + public void Update(float dt) { } + public AnimatorStateInfo GetCurrentAnimatorStateInfo(int layer) => default; + public AnimatorClipInfo[] GetCurrentAnimatorClipInfo(int layer) => new AnimatorClipInfo[0]; } - public class AnimationCurve { public float Evaluate(float t) => 0f; } + public class AnimationCurve { public float Evaluate(float t) => 0f; public int length => 0; public Keyframe[] keys { get; set; } public WrapMode preWrapMode { get; set; } public WrapMode postWrapMode { get; set; } public static AnimationCurve Linear(float a, float b, float c, float d) => new AnimationCurve(); } public class AudioClip : Object { public float length => 0f; } public class AudioSource : Component { public AudioClip clip { get; set; } public float volume { get; set; } public bool isPlaying => false; public bool loop { get; set; } public void Play() { } public void Stop() { } public void Pause() { } } public class Camera : Component