源战役客户端
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

165 行
3.6 KiB

  1. //this source code was auto-generated by tolua#, do not modify it
  2. using System;
  3. using LuaInterface;
  4. public class RadarWrap
  5. {
  6. public static void Register(LuaState L)
  7. {
  8. L.BeginClass(typeof(Radar), typeof(UnityEngine.MonoBehaviour));
  9. L.RegFunction("SetVerticeLength", SetVerticeLength);
  10. L.RegFunction("SetEdgeSizes", SetEdgeSizes);
  11. L.RegFunction("Fresh", Fresh);
  12. L.RegFunction("__eq", op_Equality);
  13. L.RegFunction("__tostring", ToLua.op_ToString);
  14. L.RegVar("scale", get_scale, set_scale);
  15. L.RegVar("baseSize", get_baseSize, set_baseSize);
  16. L.EndClass();
  17. }
  18. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  19. static int SetVerticeLength(IntPtr L)
  20. {
  21. try
  22. {
  23. ToLua.CheckArgsCount(L, 2);
  24. Radar obj = (Radar)ToLua.CheckObject(L, 1, typeof(Radar));
  25. int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
  26. obj.SetVerticeLength(arg0);
  27. return 0;
  28. }
  29. catch(Exception e)
  30. {
  31. return LuaDLL.toluaL_exception(L, e);
  32. }
  33. }
  34. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  35. static int SetEdgeSizes(IntPtr L)
  36. {
  37. try
  38. {
  39. ToLua.CheckArgsCount(L, 3);
  40. Radar obj = (Radar)ToLua.CheckObject(L, 1, typeof(Radar));
  41. int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
  42. float arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
  43. obj.SetEdgeSizes(arg0, arg1);
  44. return 0;
  45. }
  46. catch(Exception e)
  47. {
  48. return LuaDLL.toluaL_exception(L, e);
  49. }
  50. }
  51. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  52. static int Fresh(IntPtr L)
  53. {
  54. try
  55. {
  56. ToLua.CheckArgsCount(L, 1);
  57. Radar obj = (Radar)ToLua.CheckObject(L, 1, typeof(Radar));
  58. obj.Fresh();
  59. return 0;
  60. }
  61. catch(Exception e)
  62. {
  63. return LuaDLL.toluaL_exception(L, e);
  64. }
  65. }
  66. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  67. static int op_Equality(IntPtr L)
  68. {
  69. try
  70. {
  71. ToLua.CheckArgsCount(L, 2);
  72. UnityEngine.Object arg0 = (UnityEngine.Object)ToLua.ToObject(L, 1);
  73. UnityEngine.Object arg1 = (UnityEngine.Object)ToLua.ToObject(L, 2);
  74. bool o = arg0 == arg1;
  75. LuaDLL.lua_pushboolean(L, o);
  76. return 1;
  77. }
  78. catch(Exception e)
  79. {
  80. return LuaDLL.toluaL_exception(L, e);
  81. }
  82. }
  83. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  84. static int get_scale(IntPtr L)
  85. {
  86. object o = null;
  87. try
  88. {
  89. o = ToLua.ToObject(L, 1);
  90. Radar obj = (Radar)o;
  91. float ret = obj.scale;
  92. LuaDLL.lua_pushnumber(L, ret);
  93. return 1;
  94. }
  95. catch(Exception e)
  96. {
  97. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index scale on a nil value" : e.Message);
  98. }
  99. }
  100. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  101. static int get_baseSize(IntPtr L)
  102. {
  103. object o = null;
  104. try
  105. {
  106. o = ToLua.ToObject(L, 1);
  107. Radar obj = (Radar)o;
  108. float ret = obj.baseSize;
  109. LuaDLL.lua_pushnumber(L, ret);
  110. return 1;
  111. }
  112. catch(Exception e)
  113. {
  114. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index baseSize on a nil value" : e.Message);
  115. }
  116. }
  117. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  118. static int set_scale(IntPtr L)
  119. {
  120. object o = null;
  121. try
  122. {
  123. o = ToLua.ToObject(L, 1);
  124. Radar obj = (Radar)o;
  125. float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
  126. obj.scale = arg0;
  127. return 0;
  128. }
  129. catch(Exception e)
  130. {
  131. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index scale on a nil value" : e.Message);
  132. }
  133. }
  134. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  135. static int set_baseSize(IntPtr L)
  136. {
  137. object o = null;
  138. try
  139. {
  140. o = ToLua.ToObject(L, 1);
  141. Radar obj = (Radar)o;
  142. float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
  143. obj.baseSize = arg0;
  144. return 0;
  145. }
  146. catch(Exception e)
  147. {
  148. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index baseSize on a nil value" : e.Message);
  149. }
  150. }
  151. }