源战役客户端
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.

91 lines
2.7 KiB

  1. //this source code was auto-generated by tolua#, do not modify it
  2. using System;
  3. using LuaInterface;
  4. public class UnityEngine_ScreenCaptureWrap
  5. {
  6. public static void Register(LuaState L)
  7. {
  8. L.BeginStaticLibs("ScreenCapture");
  9. L.RegFunction("CaptureScreenshot", CaptureScreenshot);
  10. L.RegFunction("CaptureScreenshotAsTexture", CaptureScreenshotAsTexture);
  11. L.EndStaticLibs();
  12. }
  13. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  14. static int CaptureScreenshot(IntPtr L)
  15. {
  16. try
  17. {
  18. int count = LuaDLL.lua_gettop(L);
  19. if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(string)))
  20. {
  21. string arg0 = ToLua.ToString(L, 1);
  22. UnityEngine.ScreenCapture.CaptureScreenshot(arg0);
  23. return 0;
  24. }
  25. else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(int)))
  26. {
  27. string arg0 = ToLua.ToString(L, 1);
  28. int arg1 = (int)LuaDLL.lua_tonumber(L, 2);
  29. UnityEngine.ScreenCapture.CaptureScreenshot(arg0, arg1);
  30. return 0;
  31. }
  32. else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(UnityEngine.ScreenCapture.StereoScreenCaptureMode)))
  33. {
  34. string arg0 = ToLua.ToString(L, 1);
  35. UnityEngine.ScreenCapture.StereoScreenCaptureMode arg1 = (UnityEngine.ScreenCapture.StereoScreenCaptureMode)ToLua.ToObject(L, 2);
  36. UnityEngine.ScreenCapture.CaptureScreenshot(arg0, arg1);
  37. return 0;
  38. }
  39. else
  40. {
  41. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.ScreenCapture.CaptureScreenshot");
  42. }
  43. }
  44. catch(Exception e)
  45. {
  46. return LuaDLL.toluaL_exception(L, e);
  47. }
  48. }
  49. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  50. static int CaptureScreenshotAsTexture(IntPtr L)
  51. {
  52. try
  53. {
  54. int count = LuaDLL.lua_gettop(L);
  55. if (count == 0)
  56. {
  57. UnityEngine.Texture2D o = UnityEngine.ScreenCapture.CaptureScreenshotAsTexture();
  58. ToLua.Push(L, o);
  59. return 1;
  60. }
  61. else if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(int)))
  62. {
  63. int arg0 = (int)LuaDLL.lua_tonumber(L, 1);
  64. UnityEngine.Texture2D o = UnityEngine.ScreenCapture.CaptureScreenshotAsTexture(arg0);
  65. ToLua.Push(L, o);
  66. return 1;
  67. }
  68. else if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.ScreenCapture.StereoScreenCaptureMode)))
  69. {
  70. UnityEngine.ScreenCapture.StereoScreenCaptureMode arg0 = (UnityEngine.ScreenCapture.StereoScreenCaptureMode)ToLua.ToObject(L, 1);
  71. UnityEngine.Texture2D o = UnityEngine.ScreenCapture.CaptureScreenshotAsTexture(arg0);
  72. ToLua.Push(L, o);
  73. return 1;
  74. }
  75. else
  76. {
  77. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.ScreenCapture.CaptureScreenshotAsTexture");
  78. }
  79. }
  80. catch(Exception e)
  81. {
  82. return LuaDLL.toluaL_exception(L, e);
  83. }
  84. }
  85. }