ES2Init.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. using UnityEngine;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. public class ES2Init : MonoBehaviour
  6. {
  7. public void Awake()
  8. {
  9. ES2TypeManager.types = new Dictionary<Type, ES2Type>
  10. {
  11. {typeof(System.Boolean), new ES2_bool()},
  12. {typeof(System.Byte), new ES2_byte()},
  13. {typeof(System.Char), new ES2_char()},
  14. {typeof(System.Decimal), new ES2_decimal()},
  15. {typeof(System.Double), new ES2_double()},
  16. {typeof(System.Single), new ES2_float()},
  17. {typeof(System.Int32), new ES2_int()},
  18. {typeof(System.Int64), new ES2_long()},
  19. {typeof(System.Int16), new ES2_short()},
  20. {typeof(System.String), new ES2_string()},
  21. {typeof(System.SByte), new ES2_sbyte()},
  22. {typeof(System.UInt32), new ES2_uint()},
  23. {typeof(System.UInt64), new ES2_ulong()},
  24. {typeof(System.UInt16), new ES2_ushort()},
  25. {typeof(UnityEngine.Vector2), new ES2_Vector2()},
  26. {typeof(UnityEngine.Vector3), new ES2_Vector3()},
  27. {typeof(UnityEngine.Vector4), new ES2_Vector4()},
  28. {typeof(UnityEngine.Transform), new ES2_Transform()},
  29. {typeof(UnityEngine.Texture2D), new ES2_Texture2D()},
  30. {typeof(UnityEngine.Quaternion), new ES2_Quaternion()},
  31. {typeof(UnityEngine.BoxCollider), new ES2_BoxCollider()},
  32. {typeof(UnityEngine.Mesh), new ES2_Mesh()},
  33. {typeof(UnityEngine.Color), new ES2_Color()},
  34. {typeof(UnityEngine.CapsuleCollider), new ES2_CapsuleCollider()},
  35. {typeof(UnityEngine.SphereCollider), new ES2_SphereCollider()},
  36. {typeof(UnityEngine.MeshCollider), new ES2_MeshCollider()},
  37. {typeof(UnityEngine.AudioClip), new ES2_AudioClip()},
  38. {typeof(UnityEngine.Color32), new ES2_Color32()},
  39. {typeof(UnityEngine.Material), new ES2_Material()},
  40. {typeof(UnityEngine.Rect), new ES2_Rect()},
  41. {typeof(UnityEngine.Bounds), new ES2_Bounds()}
  42. };
  43. }
  44. }