ETModel_Unit_Binding.cs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Reflection;
  5. using System.Runtime.InteropServices;
  6. using ILRuntime.CLR.TypeSystem;
  7. using ILRuntime.CLR.Method;
  8. using ILRuntime.Runtime.Enviorment;
  9. using ILRuntime.Runtime.Intepreter;
  10. using ILRuntime.Runtime.Stack;
  11. using ILRuntime.Reflection;
  12. using ILRuntime.CLR.Utils;
  13. namespace ILRuntime.Runtime.Generated
  14. {
  15. unsafe class ETModel_Unit_Binding
  16. {
  17. public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
  18. {
  19. BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
  20. MethodBase method;
  21. FieldInfo field;
  22. Type[] args;
  23. Type type = typeof(ETModel.Unit);
  24. args = new Type[]{typeof(UnityEngine.Vector3)};
  25. method = type.GetMethod("set_Position", flag, null, args, null);
  26. app.RegisterCLRMethodRedirection(method, set_Position_0);
  27. args = new Type[]{};
  28. method = type.GetMethod("get_Position", flag, null, args, null);
  29. app.RegisterCLRMethodRedirection(method, get_Position_1);
  30. field = type.GetField("IntPos", flag);
  31. app.RegisterCLRFieldGetter(field, get_IntPos_0);
  32. app.RegisterCLRFieldSetter(field, set_IntPos_0);
  33. }
  34. static StackObject* set_Position_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  35. {
  36. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  37. StackObject* ptr_of_this_method;
  38. StackObject* __ret = ILIntepreter.Minus(__esp, 2);
  39. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  40. UnityEngine.Vector3 @value = (UnityEngine.Vector3)typeof(UnityEngine.Vector3).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  41. __intp.Free(ptr_of_this_method);
  42. ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
  43. ETModel.Unit instance_of_this_method = (ETModel.Unit)typeof(ETModel.Unit).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  44. __intp.Free(ptr_of_this_method);
  45. instance_of_this_method.Position = value;
  46. return __ret;
  47. }
  48. static StackObject* get_Position_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  49. {
  50. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  51. StackObject* ptr_of_this_method;
  52. StackObject* __ret = ILIntepreter.Minus(__esp, 1);
  53. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  54. ETModel.Unit instance_of_this_method = (ETModel.Unit)typeof(ETModel.Unit).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  55. __intp.Free(ptr_of_this_method);
  56. var result_of_this_method = instance_of_this_method.Position;
  57. return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
  58. }
  59. static object get_IntPos_0(ref object o)
  60. {
  61. return ((ETModel.Unit)o).IntPos;
  62. }
  63. static void set_IntPos_0(ref object o, object v)
  64. {
  65. ((ETModel.Unit)o).IntPos = (global::VInt3)v;
  66. }
  67. }
  68. }