源战役客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123 lines
2.8 KiB

  1. //this source code was auto-generated by tolua#, do not modify it
  2. using System;
  3. using LuaInterface;
  4. public class UnityEngine_TextAssetWrap
  5. {
  6. public static void Register(LuaState L)
  7. {
  8. L.BeginClass(typeof(UnityEngine.TextAsset), typeof(UnityEngine.Object));
  9. L.RegFunction("ToString", ToString);
  10. L.RegFunction("New", _CreateUnityEngine_TextAsset);
  11. L.RegFunction("__eq", op_Equality);
  12. L.RegFunction("__tostring", ToLua.op_ToString);
  13. L.RegVar("text", get_text, null);
  14. L.RegVar("bytes", get_bytes, null);
  15. L.EndClass();
  16. }
  17. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  18. static int _CreateUnityEngine_TextAsset(IntPtr L)
  19. {
  20. try
  21. {
  22. int count = LuaDLL.lua_gettop(L);
  23. if (count == 0)
  24. {
  25. UnityEngine.TextAsset obj = new UnityEngine.TextAsset();
  26. ToLua.Push(L, obj);
  27. return 1;
  28. }
  29. else if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(string)))
  30. {
  31. string arg0 = ToLua.CheckString(L, 1);
  32. UnityEngine.TextAsset obj = new UnityEngine.TextAsset(arg0);
  33. ToLua.Push(L, obj);
  34. return 1;
  35. }
  36. else
  37. {
  38. return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: UnityEngine.TextAsset.New");
  39. }
  40. }
  41. catch(Exception e)
  42. {
  43. return LuaDLL.toluaL_exception(L, e);
  44. }
  45. }
  46. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  47. static int ToString(IntPtr L)
  48. {
  49. try
  50. {
  51. ToLua.CheckArgsCount(L, 1);
  52. UnityEngine.TextAsset obj = (UnityEngine.TextAsset)ToLua.CheckObject(L, 1, typeof(UnityEngine.TextAsset));
  53. string o = obj.ToString();
  54. LuaDLL.lua_pushstring(L, o);
  55. return 1;
  56. }
  57. catch(Exception e)
  58. {
  59. return LuaDLL.toluaL_exception(L, e);
  60. }
  61. }
  62. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  63. static int op_Equality(IntPtr L)
  64. {
  65. try
  66. {
  67. ToLua.CheckArgsCount(L, 2);
  68. UnityEngine.Object arg0 = (UnityEngine.Object)ToLua.ToObject(L, 1);
  69. UnityEngine.Object arg1 = (UnityEngine.Object)ToLua.ToObject(L, 2);
  70. bool o = arg0 == arg1;
  71. LuaDLL.lua_pushboolean(L, o);
  72. return 1;
  73. }
  74. catch(Exception e)
  75. {
  76. return LuaDLL.toluaL_exception(L, e);
  77. }
  78. }
  79. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  80. static int get_text(IntPtr L)
  81. {
  82. object o = null;
  83. try
  84. {
  85. o = ToLua.ToObject(L, 1);
  86. UnityEngine.TextAsset obj = (UnityEngine.TextAsset)o;
  87. string ret = obj.text;
  88. LuaDLL.lua_pushstring(L, ret);
  89. return 1;
  90. }
  91. catch(Exception e)
  92. {
  93. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index text on a nil value" : e.Message);
  94. }
  95. }
  96. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  97. static int get_bytes(IntPtr L)
  98. {
  99. object o = null;
  100. try
  101. {
  102. o = ToLua.ToObject(L, 1);
  103. UnityEngine.TextAsset obj = (UnityEngine.TextAsset)o;
  104. byte[] ret = obj.bytes;
  105. ToLua.Push(L, ret);
  106. return 1;
  107. }
  108. catch(Exception e)
  109. {
  110. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index bytes on a nil value" : e.Message);
  111. }
  112. }
  113. }