ToLua_LuaInterface_LuaMethod.cs 779 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using System;
  2. using LuaInterface;
  3. public class ToLua_LuaInterface_LuaMethod
  4. {
  5. public static string CallDefined =
  6. @" try
  7. {
  8. LuaMethod obj = (LuaMethod)ToLua.CheckObject(L, 1, typeof(LuaMethod));
  9. return obj.Call(L);
  10. }
  11. catch(Exception e)
  12. {
  13. return LuaDLL.toluaL_exception(L, e);
  14. }";
  15. public static string DestroyDefined =
  16. @" try
  17. {
  18. ToLua.CheckArgsCount(L, 1);
  19. LuaMethod obj = (LuaMethod)ToLua.CheckObject(L, 1, typeof(LuaMethod));
  20. obj.Destroy();
  21. ToLua.Destroy(L);
  22. return 0;
  23. }
  24. catch(Exception e)
  25. {
  26. return LuaDLL.toluaL_exception(L, e);
  27. }";
  28. [UseDefinedAttribute]
  29. public int Call(IntPtr L)
  30. {
  31. return 0;
  32. }
  33. [UseDefinedAttribute]
  34. public void Destroy()
  35. {
  36. }
  37. }