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

396 行
9.1 KiB

  1. //this source code was auto-generated by tolua#, do not modify it
  2. using System;
  3. using LuaInterface;
  4. public class UnityEngine_ScreenWrap
  5. {
  6. public static void Register(LuaState L)
  7. {
  8. L.BeginStaticLibs("Screen");
  9. L.RegFunction("SetResolution", SetResolution);
  10. L.RegVar("width", get_width, null);
  11. L.RegVar("height", get_height, null);
  12. L.RegVar("dpi", get_dpi, null);
  13. L.RegVar("orientation", get_orientation, set_orientation);
  14. L.RegVar("sleepTimeout", get_sleepTimeout, set_sleepTimeout);
  15. L.RegVar("autorotateToPortrait", get_autorotateToPortrait, set_autorotateToPortrait);
  16. L.RegVar("autorotateToPortraitUpsideDown", get_autorotateToPortraitUpsideDown, set_autorotateToPortraitUpsideDown);
  17. L.RegVar("autorotateToLandscapeLeft", get_autorotateToLandscapeLeft, set_autorotateToLandscapeLeft);
  18. L.RegVar("autorotateToLandscapeRight", get_autorotateToLandscapeRight, set_autorotateToLandscapeRight);
  19. L.RegVar("currentResolution", get_currentResolution, null);
  20. L.RegVar("fullScreen", get_fullScreen, set_fullScreen);
  21. L.RegVar("fullScreenMode", get_fullScreenMode, set_fullScreenMode);
  22. L.RegVar("safeArea", get_safeArea, null);
  23. L.RegVar("resolutions", get_resolutions, null);
  24. L.EndStaticLibs();
  25. }
  26. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  27. static int SetResolution(IntPtr L)
  28. {
  29. try
  30. {
  31. int count = LuaDLL.lua_gettop(L);
  32. if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(int), typeof(int), typeof(UnityEngine.FullScreenMode)))
  33. {
  34. int arg0 = (int)LuaDLL.lua_tonumber(L, 1);
  35. int arg1 = (int)LuaDLL.lua_tonumber(L, 2);
  36. UnityEngine.FullScreenMode arg2 = (UnityEngine.FullScreenMode)ToLua.ToObject(L, 3);
  37. UnityEngine.Screen.SetResolution(arg0, arg1, arg2);
  38. return 0;
  39. }
  40. else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(int), typeof(int), typeof(bool)))
  41. {
  42. int arg0 = (int)LuaDLL.lua_tonumber(L, 1);
  43. int arg1 = (int)LuaDLL.lua_tonumber(L, 2);
  44. bool arg2 = LuaDLL.lua_toboolean(L, 3);
  45. UnityEngine.Screen.SetResolution(arg0, arg1, arg2);
  46. return 0;
  47. }
  48. else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(int), typeof(int), typeof(UnityEngine.FullScreenMode), typeof(int)))
  49. {
  50. int arg0 = (int)LuaDLL.lua_tonumber(L, 1);
  51. int arg1 = (int)LuaDLL.lua_tonumber(L, 2);
  52. UnityEngine.FullScreenMode arg2 = (UnityEngine.FullScreenMode)ToLua.ToObject(L, 3);
  53. int arg3 = (int)LuaDLL.lua_tonumber(L, 4);
  54. UnityEngine.Screen.SetResolution(arg0, arg1, arg2, arg3);
  55. return 0;
  56. }
  57. else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(int), typeof(int), typeof(bool), typeof(int)))
  58. {
  59. int arg0 = (int)LuaDLL.lua_tonumber(L, 1);
  60. int arg1 = (int)LuaDLL.lua_tonumber(L, 2);
  61. bool arg2 = LuaDLL.lua_toboolean(L, 3);
  62. int arg3 = (int)LuaDLL.lua_tonumber(L, 4);
  63. UnityEngine.Screen.SetResolution(arg0, arg1, arg2, arg3);
  64. return 0;
  65. }
  66. else
  67. {
  68. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Screen.SetResolution");
  69. }
  70. }
  71. catch(Exception e)
  72. {
  73. return LuaDLL.toluaL_exception(L, e);
  74. }
  75. }
  76. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  77. static int get_width(IntPtr L)
  78. {
  79. try
  80. {
  81. LuaDLL.lua_pushinteger(L, UnityEngine.Screen.width);
  82. return 1;
  83. }
  84. catch(Exception e)
  85. {
  86. return LuaDLL.toluaL_exception(L, e);
  87. }
  88. }
  89. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  90. static int get_height(IntPtr L)
  91. {
  92. try
  93. {
  94. LuaDLL.lua_pushinteger(L, UnityEngine.Screen.height);
  95. return 1;
  96. }
  97. catch(Exception e)
  98. {
  99. return LuaDLL.toluaL_exception(L, e);
  100. }
  101. }
  102. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  103. static int get_dpi(IntPtr L)
  104. {
  105. try
  106. {
  107. LuaDLL.lua_pushnumber(L, UnityEngine.Screen.dpi);
  108. return 1;
  109. }
  110. catch(Exception e)
  111. {
  112. return LuaDLL.toluaL_exception(L, e);
  113. }
  114. }
  115. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  116. static int get_orientation(IntPtr L)
  117. {
  118. try
  119. {
  120. ToLua.Push(L, UnityEngine.Screen.orientation);
  121. return 1;
  122. }
  123. catch(Exception e)
  124. {
  125. return LuaDLL.toluaL_exception(L, e);
  126. }
  127. }
  128. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  129. static int get_sleepTimeout(IntPtr L)
  130. {
  131. try
  132. {
  133. LuaDLL.lua_pushinteger(L, UnityEngine.Screen.sleepTimeout);
  134. return 1;
  135. }
  136. catch(Exception e)
  137. {
  138. return LuaDLL.toluaL_exception(L, e);
  139. }
  140. }
  141. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  142. static int get_autorotateToPortrait(IntPtr L)
  143. {
  144. try
  145. {
  146. LuaDLL.lua_pushboolean(L, UnityEngine.Screen.autorotateToPortrait);
  147. return 1;
  148. }
  149. catch(Exception e)
  150. {
  151. return LuaDLL.toluaL_exception(L, e);
  152. }
  153. }
  154. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  155. static int get_autorotateToPortraitUpsideDown(IntPtr L)
  156. {
  157. try
  158. {
  159. LuaDLL.lua_pushboolean(L, UnityEngine.Screen.autorotateToPortraitUpsideDown);
  160. return 1;
  161. }
  162. catch(Exception e)
  163. {
  164. return LuaDLL.toluaL_exception(L, e);
  165. }
  166. }
  167. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  168. static int get_autorotateToLandscapeLeft(IntPtr L)
  169. {
  170. try
  171. {
  172. LuaDLL.lua_pushboolean(L, UnityEngine.Screen.autorotateToLandscapeLeft);
  173. return 1;
  174. }
  175. catch(Exception e)
  176. {
  177. return LuaDLL.toluaL_exception(L, e);
  178. }
  179. }
  180. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  181. static int get_autorotateToLandscapeRight(IntPtr L)
  182. {
  183. try
  184. {
  185. LuaDLL.lua_pushboolean(L, UnityEngine.Screen.autorotateToLandscapeRight);
  186. return 1;
  187. }
  188. catch(Exception e)
  189. {
  190. return LuaDLL.toluaL_exception(L, e);
  191. }
  192. }
  193. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  194. static int get_currentResolution(IntPtr L)
  195. {
  196. try
  197. {
  198. ToLua.PushValue(L, UnityEngine.Screen.currentResolution);
  199. return 1;
  200. }
  201. catch(Exception e)
  202. {
  203. return LuaDLL.toluaL_exception(L, e);
  204. }
  205. }
  206. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  207. static int get_fullScreen(IntPtr L)
  208. {
  209. try
  210. {
  211. LuaDLL.lua_pushboolean(L, UnityEngine.Screen.fullScreen);
  212. return 1;
  213. }
  214. catch(Exception e)
  215. {
  216. return LuaDLL.toluaL_exception(L, e);
  217. }
  218. }
  219. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  220. static int get_fullScreenMode(IntPtr L)
  221. {
  222. try
  223. {
  224. ToLua.Push(L, UnityEngine.Screen.fullScreenMode);
  225. return 1;
  226. }
  227. catch(Exception e)
  228. {
  229. return LuaDLL.toluaL_exception(L, e);
  230. }
  231. }
  232. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  233. static int get_safeArea(IntPtr L)
  234. {
  235. try
  236. {
  237. ToLua.PushValue(L, UnityEngine.Screen.safeArea);
  238. return 1;
  239. }
  240. catch(Exception e)
  241. {
  242. return LuaDLL.toluaL_exception(L, e);
  243. }
  244. }
  245. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  246. static int get_resolutions(IntPtr L)
  247. {
  248. try
  249. {
  250. ToLua.Push(L, UnityEngine.Screen.resolutions);
  251. return 1;
  252. }
  253. catch(Exception e)
  254. {
  255. return LuaDLL.toluaL_exception(L, e);
  256. }
  257. }
  258. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  259. static int set_orientation(IntPtr L)
  260. {
  261. try
  262. {
  263. UnityEngine.ScreenOrientation arg0 = (UnityEngine.ScreenOrientation)ToLua.CheckObject(L, 2, typeof(UnityEngine.ScreenOrientation));
  264. UnityEngine.Screen.orientation = arg0;
  265. return 0;
  266. }
  267. catch(Exception e)
  268. {
  269. return LuaDLL.toluaL_exception(L, e);
  270. }
  271. }
  272. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  273. static int set_sleepTimeout(IntPtr L)
  274. {
  275. try
  276. {
  277. int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
  278. UnityEngine.Screen.sleepTimeout = arg0;
  279. return 0;
  280. }
  281. catch(Exception e)
  282. {
  283. return LuaDLL.toluaL_exception(L, e);
  284. }
  285. }
  286. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  287. static int set_autorotateToPortrait(IntPtr L)
  288. {
  289. try
  290. {
  291. bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
  292. UnityEngine.Screen.autorotateToPortrait = arg0;
  293. return 0;
  294. }
  295. catch(Exception e)
  296. {
  297. return LuaDLL.toluaL_exception(L, e);
  298. }
  299. }
  300. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  301. static int set_autorotateToPortraitUpsideDown(IntPtr L)
  302. {
  303. try
  304. {
  305. bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
  306. UnityEngine.Screen.autorotateToPortraitUpsideDown = arg0;
  307. return 0;
  308. }
  309. catch(Exception e)
  310. {
  311. return LuaDLL.toluaL_exception(L, e);
  312. }
  313. }
  314. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  315. static int set_autorotateToLandscapeLeft(IntPtr L)
  316. {
  317. try
  318. {
  319. bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
  320. UnityEngine.Screen.autorotateToLandscapeLeft = arg0;
  321. return 0;
  322. }
  323. catch(Exception e)
  324. {
  325. return LuaDLL.toluaL_exception(L, e);
  326. }
  327. }
  328. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  329. static int set_autorotateToLandscapeRight(IntPtr L)
  330. {
  331. try
  332. {
  333. bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
  334. UnityEngine.Screen.autorotateToLandscapeRight = arg0;
  335. return 0;
  336. }
  337. catch(Exception e)
  338. {
  339. return LuaDLL.toluaL_exception(L, e);
  340. }
  341. }
  342. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  343. static int set_fullScreen(IntPtr L)
  344. {
  345. try
  346. {
  347. bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
  348. UnityEngine.Screen.fullScreen = arg0;
  349. return 0;
  350. }
  351. catch(Exception e)
  352. {
  353. return LuaDLL.toluaL_exception(L, e);
  354. }
  355. }
  356. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  357. static int set_fullScreenMode(IntPtr L)
  358. {
  359. try
  360. {
  361. UnityEngine.FullScreenMode arg0 = (UnityEngine.FullScreenMode)ToLua.CheckObject(L, 2, typeof(UnityEngine.FullScreenMode));
  362. UnityEngine.Screen.fullScreenMode = arg0;
  363. return 0;
  364. }
  365. catch(Exception e)
  366. {
  367. return LuaDLL.toluaL_exception(L, e);
  368. }
  369. }
  370. }