#if USE_UNI_LUA using LuaAPI = UniLua.Lua; using RealStatePtr = UniLua.ILuaState; using LuaCSFunction = UniLua.CSharpFunctionDelegate; #else using LuaAPI = XLua.LuaDLL.Lua; using RealStatePtr = System.IntPtr; using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; #endif using XLua; using System.Collections.Generic; namespace XLua.CSObjectWrap { using Utils = XLua.Utils; public class UnityEngineRenderingBuiltinRenderTextureTypeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UnityEngine.Rendering.BuiltinRenderTextureType), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UnityEngine.Rendering.BuiltinRenderTextureType), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UnityEngine.Rendering.BuiltinRenderTextureType), L, null, 24, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "PropertyName", UnityEngine.Rendering.BuiltinRenderTextureType.PropertyName); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BufferPtr", UnityEngine.Rendering.BuiltinRenderTextureType.BufferPtr); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "RenderTexture", UnityEngine.Rendering.BuiltinRenderTextureType.RenderTexture); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BindableTexture", UnityEngine.Rendering.BuiltinRenderTextureType.BindableTexture); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "None", UnityEngine.Rendering.BuiltinRenderTextureType.None); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "CurrentActive", UnityEngine.Rendering.BuiltinRenderTextureType.CurrentActive); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "CameraTarget", UnityEngine.Rendering.BuiltinRenderTextureType.CameraTarget); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Depth", UnityEngine.Rendering.BuiltinRenderTextureType.Depth); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "DepthNormals", UnityEngine.Rendering.BuiltinRenderTextureType.DepthNormals); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ResolvedDepth", UnityEngine.Rendering.BuiltinRenderTextureType.ResolvedDepth); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "GBuffer0", UnityEngine.Rendering.BuiltinRenderTextureType.GBuffer0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "GBuffer1", UnityEngine.Rendering.BuiltinRenderTextureType.GBuffer1); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "GBuffer2", UnityEngine.Rendering.BuiltinRenderTextureType.GBuffer2); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "GBuffer3", UnityEngine.Rendering.BuiltinRenderTextureType.GBuffer3); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Reflections", UnityEngine.Rendering.BuiltinRenderTextureType.Reflections); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "MotionVectors", UnityEngine.Rendering.BuiltinRenderTextureType.MotionVectors); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "GBuffer4", UnityEngine.Rendering.BuiltinRenderTextureType.GBuffer4); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "GBuffer5", UnityEngine.Rendering.BuiltinRenderTextureType.GBuffer5); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "GBuffer6", UnityEngine.Rendering.BuiltinRenderTextureType.GBuffer6); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "GBuffer7", UnityEngine.Rendering.BuiltinRenderTextureType.GBuffer7); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UnityEngine.Rendering.BuiltinRenderTextureType), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUnityEngineRenderingBuiltinRenderTextureType(L, (UnityEngine.Rendering.BuiltinRenderTextureType)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "PropertyName")) { translator.PushUnityEngineRenderingBuiltinRenderTextureType(L, UnityEngine.Rendering.BuiltinRenderTextureType.PropertyName); } else if (LuaAPI.xlua_is_eq_str(L, 1, "BufferPtr")) { translator.PushUnityEngineRenderingBuiltinRenderTextureType(L, UnityEngine.Rendering.BuiltinRenderTextureType.BufferPtr); } else if (LuaAPI.xlua_is_eq_str(L, 1, "RenderTexture")) { translator.PushUnityEngineRenderingBuiltinRenderTextureType(L, UnityEngine.Rendering.BuiltinRenderTextureType.RenderTexture); } else if (LuaAPI.xlua_is_eq_str(L, 1, "BindableTexture")) { translator.PushUnityEngineRenderingBuiltinRenderTextureType(L, UnityEngine.Rendering.BuiltinRenderTextureType.BindableTexture); } else if (LuaAPI.xlua_is_eq_str(L, 1, "None")) { translator.PushUnityEngineRenderingBuiltinRenderTextureType(L, UnityEngine.Rendering.BuiltinRenderTextureType.None); } else if (LuaAPI.xlua_is_eq_str(L, 1, "CurrentActive")) { translator.PushUnityEngineRenderingBuiltinRenderTextureType(L, UnityEngine.Rendering.BuiltinRenderTextureType.CurrentActive); } else if (LuaAPI.xlua_is_eq_str(L, 1, "CameraTarget")) { translator.PushUnityEngineRenderingBuiltinRenderTextureType(L, UnityEngine.Rendering.BuiltinRenderTextureType.CameraTarget); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Depth")) { translator.PushUnityEngineRenderingBuiltinRenderTextureType(L, UnityEngine.Rendering.BuiltinRenderTextureType.Depth); } else if (LuaAPI.xlua_is_eq_str(L, 1, "DepthNormals")) { translator.PushUnityEngineRenderingBuiltinRenderTextureType(L, UnityEngine.Rendering.BuiltinRenderTextureType.DepthNormals); } else if (LuaAPI.xlua_is_eq_str(L, 1, "ResolvedDepth")) { translator.PushUnityEngineRenderingBuiltinRenderTextureType(L, UnityEngine.Rendering.BuiltinRenderTextureType.ResolvedDepth); } else if (LuaAPI.xlua_is_eq_str(L, 1, "GBuffer0")) { translator.PushUnityEngineRenderingBuiltinRenderTextureType(L, UnityEngine.Rendering.BuiltinRenderTextureType.GBuffer0); } else if (LuaAPI.xlua_is_eq_str(L, 1, "GBuffer1")) { translator.PushUnityEngineRenderingBuiltinRenderTextureType(L, UnityEngine.Rendering.BuiltinRenderTextureType.GBuffer1); } else if (LuaAPI.xlua_is_eq_str(L, 1, "GBuffer2")) { translator.PushUnityEngineRenderingBuiltinRenderTextureType(L, UnityEngine.Rendering.BuiltinRenderTextureType.GBuffer2); } else if (LuaAPI.xlua_is_eq_str(L, 1, "GBuffer3")) { translator.PushUnityEngineRenderingBuiltinRenderTextureType(L, UnityEngine.Rendering.BuiltinRenderTextureType.GBuffer3); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Reflections")) { translator.PushUnityEngineRenderingBuiltinRenderTextureType(L, UnityEngine.Rendering.BuiltinRenderTextureType.Reflections); } else if (LuaAPI.xlua_is_eq_str(L, 1, "MotionVectors")) { translator.PushUnityEngineRenderingBuiltinRenderTextureType(L, UnityEngine.Rendering.BuiltinRenderTextureType.MotionVectors); } else if (LuaAPI.xlua_is_eq_str(L, 1, "GBuffer4")) { translator.PushUnityEngineRenderingBuiltinRenderTextureType(L, UnityEngine.Rendering.BuiltinRenderTextureType.GBuffer4); } else if (LuaAPI.xlua_is_eq_str(L, 1, "GBuffer5")) { translator.PushUnityEngineRenderingBuiltinRenderTextureType(L, UnityEngine.Rendering.BuiltinRenderTextureType.GBuffer5); } else if (LuaAPI.xlua_is_eq_str(L, 1, "GBuffer6")) { translator.PushUnityEngineRenderingBuiltinRenderTextureType(L, UnityEngine.Rendering.BuiltinRenderTextureType.GBuffer6); } else if (LuaAPI.xlua_is_eq_str(L, 1, "GBuffer7")) { translator.PushUnityEngineRenderingBuiltinRenderTextureType(L, UnityEngine.Rendering.BuiltinRenderTextureType.GBuffer7); } else { return LuaAPI.luaL_error(L, "invalid string for UnityEngine.Rendering.BuiltinRenderTextureType!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UnityEngine.Rendering.BuiltinRenderTextureType! Expect number or string, got + " + lua_type); } return 1; } } public class UnityEngineRenderingCameraEventWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UnityEngine.Rendering.CameraEvent), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UnityEngine.Rendering.CameraEvent), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UnityEngine.Rendering.CameraEvent), L, null, 26, 0, 0); Utils.RegisterEnumType(L, typeof(UnityEngine.Rendering.CameraEvent)); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UnityEngine.Rendering.CameraEvent), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUnityEngineRenderingCameraEvent(L, (UnityEngine.Rendering.CameraEvent)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { try { translator.TranslateToEnumToTop(L, typeof(UnityEngine.Rendering.CameraEvent), 1); } catch (System.Exception e) { return LuaAPI.luaL_error(L, "cast to " + typeof(UnityEngine.Rendering.CameraEvent) + " exception:" + e); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UnityEngine.Rendering.CameraEvent! Expect number or string, got + " + lua_type); } return 1; } } public class UnityEngineSendMessageOptionsWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UnityEngine.SendMessageOptions), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UnityEngine.SendMessageOptions), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UnityEngine.SendMessageOptions), L, null, 3, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "RequireReceiver", UnityEngine.SendMessageOptions.RequireReceiver); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "DontRequireReceiver", UnityEngine.SendMessageOptions.DontRequireReceiver); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UnityEngine.SendMessageOptions), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUnityEngineSendMessageOptions(L, (UnityEngine.SendMessageOptions)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "RequireReceiver")) { translator.PushUnityEngineSendMessageOptions(L, UnityEngine.SendMessageOptions.RequireReceiver); } else if (LuaAPI.xlua_is_eq_str(L, 1, "DontRequireReceiver")) { translator.PushUnityEngineSendMessageOptions(L, UnityEngine.SendMessageOptions.DontRequireReceiver); } else { return LuaAPI.luaL_error(L, "invalid string for UnityEngine.SendMessageOptions!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UnityEngine.SendMessageOptions! Expect number or string, got + " + lua_type); } return 1; } } public class UnityEngineRuntimePlatformWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UnityEngine.RuntimePlatform), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UnityEngine.RuntimePlatform), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UnityEngine.RuntimePlatform), L, null, 56, 0, 0); Utils.RegisterEnumType(L, typeof(UnityEngine.RuntimePlatform)); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UnityEngine.RuntimePlatform), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUnityEngineRuntimePlatform(L, (UnityEngine.RuntimePlatform)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { try { translator.TranslateToEnumToTop(L, typeof(UnityEngine.RuntimePlatform), 1); } catch (System.Exception e) { return LuaAPI.luaL_error(L, "cast to " + typeof(UnityEngine.RuntimePlatform) + " exception:" + e); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UnityEngine.RuntimePlatform! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoPluginsCommonUIEventDefineWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Plugins.Common.UIEventDefine), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Plugins.Common.UIEventDefine), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Plugins.Common.UIEventDefine), L, null, 940, 0, 0); Utils.RegisterEnumType(L, typeof(Thousandto.Plugins.Common.UIEventDefine)); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Plugins.Common.UIEventDefine), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoPluginsCommonUIEventDefine(L, (Thousandto.Plugins.Common.UIEventDefine)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { try { translator.TranslateToEnumToTop(L, typeof(Thousandto.Plugins.Common.UIEventDefine), 1); } catch (System.Exception e) { return LuaAPI.luaL_error(L, "cast to " + typeof(Thousandto.Plugins.Common.UIEventDefine) + " exception:" + e); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Plugins.Common.UIEventDefine! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCodeGlobalLogicEventDefineWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Code.Global.LogicEventDefine), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Code.Global.LogicEventDefine), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Code.Global.LogicEventDefine), L, null, 304, 0, 0); Utils.RegisterEnumType(L, typeof(Thousandto.Code.Global.LogicEventDefine)); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Code.Global.LogicEventDefine), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCodeGlobalLogicEventDefine(L, (Thousandto.Code.Global.LogicEventDefine)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { try { translator.TranslateToEnumToTop(L, typeof(Thousandto.Code.Global.LogicEventDefine), 1); } catch (System.Exception e) { return LuaAPI.luaL_error(L, "cast to " + typeof(Thousandto.Code.Global.LogicEventDefine) + " exception:" + e); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Code.Global.LogicEventDefine! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCoreAssetImageTypeCodeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Core.Asset.ImageTypeCode), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Core.Asset.ImageTypeCode), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Core.Asset.ImageTypeCode), L, null, 7, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "None", Thousandto.Core.Asset.ImageTypeCode.None); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "UI", Thousandto.Core.Asset.ImageTypeCode.UI); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "MiniMap", Thousandto.Core.Asset.ImageTypeCode.MiniMap); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Shader", Thousandto.Core.Asset.ImageTypeCode.Shader); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "VFX", Thousandto.Core.Asset.ImageTypeCode.VFX); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "House", Thousandto.Core.Asset.ImageTypeCode.House); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Core.Asset.ImageTypeCode), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCoreAssetImageTypeCode(L, (Thousandto.Core.Asset.ImageTypeCode)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "None")) { translator.PushThousandtoCoreAssetImageTypeCode(L, Thousandto.Core.Asset.ImageTypeCode.None); } else if (LuaAPI.xlua_is_eq_str(L, 1, "UI")) { translator.PushThousandtoCoreAssetImageTypeCode(L, Thousandto.Core.Asset.ImageTypeCode.UI); } else if (LuaAPI.xlua_is_eq_str(L, 1, "MiniMap")) { translator.PushThousandtoCoreAssetImageTypeCode(L, Thousandto.Core.Asset.ImageTypeCode.MiniMap); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Shader")) { translator.PushThousandtoCoreAssetImageTypeCode(L, Thousandto.Core.Asset.ImageTypeCode.Shader); } else if (LuaAPI.xlua_is_eq_str(L, 1, "VFX")) { translator.PushThousandtoCoreAssetImageTypeCode(L, Thousandto.Core.Asset.ImageTypeCode.VFX); } else if (LuaAPI.xlua_is_eq_str(L, 1, "House")) { translator.PushThousandtoCoreAssetImageTypeCode(L, Thousandto.Core.Asset.ImageTypeCode.House); } else { return LuaAPI.luaL_error(L, "invalid string for Thousandto.Core.Asset.ImageTypeCode!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Core.Asset.ImageTypeCode! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCoreAssetAudioTypeCodeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Core.Asset.AudioTypeCode), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Core.Asset.AudioTypeCode), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Core.Asset.AudioTypeCode), L, null, 8, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "None", Thousandto.Core.Asset.AudioTypeCode.None); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Ambient", Thousandto.Core.Asset.AudioTypeCode.Ambient); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Music", Thousandto.Core.Asset.AudioTypeCode.Music); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Sfx", Thousandto.Core.Asset.AudioTypeCode.Sfx); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Speech", Thousandto.Core.Asset.AudioTypeCode.Speech); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "UI", Thousandto.Core.Asset.AudioTypeCode.UI); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Count", Thousandto.Core.Asset.AudioTypeCode.Count); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Core.Asset.AudioTypeCode), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCoreAssetAudioTypeCode(L, (Thousandto.Core.Asset.AudioTypeCode)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "None")) { translator.PushThousandtoCoreAssetAudioTypeCode(L, Thousandto.Core.Asset.AudioTypeCode.None); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Ambient")) { translator.PushThousandtoCoreAssetAudioTypeCode(L, Thousandto.Core.Asset.AudioTypeCode.Ambient); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Music")) { translator.PushThousandtoCoreAssetAudioTypeCode(L, Thousandto.Core.Asset.AudioTypeCode.Music); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Sfx")) { translator.PushThousandtoCoreAssetAudioTypeCode(L, Thousandto.Core.Asset.AudioTypeCode.Sfx); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Speech")) { translator.PushThousandtoCoreAssetAudioTypeCode(L, Thousandto.Core.Asset.AudioTypeCode.Speech); } else if (LuaAPI.xlua_is_eq_str(L, 1, "UI")) { translator.PushThousandtoCoreAssetAudioTypeCode(L, Thousandto.Core.Asset.AudioTypeCode.UI); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Count")) { translator.PushThousandtoCoreAssetAudioTypeCode(L, Thousandto.Core.Asset.AudioTypeCode.Count); } else { return LuaAPI.luaL_error(L, "invalid string for Thousandto.Core.Asset.AudioTypeCode!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Core.Asset.AudioTypeCode! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCodeLogicMsgBoxResultCodeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Code.Logic.MsgBoxResultCode), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Code.Logic.MsgBoxResultCode), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Code.Logic.MsgBoxResultCode), L, null, 4, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "None", Thousandto.Code.Logic.MsgBoxResultCode.None); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Button1", Thousandto.Code.Logic.MsgBoxResultCode.Button1); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Button2", Thousandto.Code.Logic.MsgBoxResultCode.Button2); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Code.Logic.MsgBoxResultCode), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCodeLogicMsgBoxResultCode(L, (Thousandto.Code.Logic.MsgBoxResultCode)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "None")) { translator.PushThousandtoCodeLogicMsgBoxResultCode(L, Thousandto.Code.Logic.MsgBoxResultCode.None); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Button1")) { translator.PushThousandtoCodeLogicMsgBoxResultCode(L, Thousandto.Code.Logic.MsgBoxResultCode.Button1); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Button2")) { translator.PushThousandtoCodeLogicMsgBoxResultCode(L, Thousandto.Code.Logic.MsgBoxResultCode.Button2); } else { return LuaAPI.luaL_error(L, "invalid string for Thousandto.Code.Logic.MsgBoxResultCode!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Code.Logic.MsgBoxResultCode! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCodeLogicMsgBoxIsSelectWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Code.Logic.MsgBoxIsSelect), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Code.Logic.MsgBoxIsSelect), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Code.Logic.MsgBoxIsSelect), L, null, 3, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Selected", Thousandto.Code.Logic.MsgBoxIsSelect.Selected); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "UnSelected", Thousandto.Code.Logic.MsgBoxIsSelect.UnSelected); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Code.Logic.MsgBoxIsSelect), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCodeLogicMsgBoxIsSelect(L, (Thousandto.Code.Logic.MsgBoxIsSelect)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Selected")) { translator.PushThousandtoCodeLogicMsgBoxIsSelect(L, Thousandto.Code.Logic.MsgBoxIsSelect.Selected); } else if (LuaAPI.xlua_is_eq_str(L, 1, "UnSelected")) { translator.PushThousandtoCodeLogicMsgBoxIsSelect(L, Thousandto.Code.Logic.MsgBoxIsSelect.UnSelected); } else { return LuaAPI.luaL_error(L, "invalid string for Thousandto.Code.Logic.MsgBoxIsSelect!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Code.Logic.MsgBoxIsSelect! Expect number or string, got + " + lua_type); } return 1; } } public class UnityEngineKeyCodeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UnityEngine.KeyCode), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UnityEngine.KeyCode), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UnityEngine.KeyCode), L, null, 331, 0, 0); Utils.RegisterEnumType(L, typeof(UnityEngine.KeyCode)); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UnityEngine.KeyCode), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUnityEngineKeyCode(L, (UnityEngine.KeyCode)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { try { translator.TranslateToEnumToTop(L, typeof(UnityEngine.KeyCode), 1); } catch (System.Exception e) { return LuaAPI.luaL_error(L, "cast to " + typeof(UnityEngine.KeyCode) + " exception:" + e); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UnityEngine.KeyCode! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCodeLogicFSkinTypeCodeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Code.Logic.FSkinTypeCode), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Code.Logic.FSkinTypeCode), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Code.Logic.FSkinTypeCode), L, null, 16, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "None", Thousandto.Code.Logic.FSkinTypeCode.None); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "LocalPlayer", Thousandto.Code.Logic.FSkinTypeCode.LocalPlayer); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Player", Thousandto.Code.Logic.FSkinTypeCode.Player); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "NPC", Thousandto.Code.Logic.FSkinTypeCode.NPC); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Monster", Thousandto.Code.Logic.FSkinTypeCode.Monster); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BossMonster", Thousandto.Code.Logic.FSkinTypeCode.BossMonster); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "SpecMonster", Thousandto.Code.Logic.FSkinTypeCode.SpecMonster); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "LocalPet", Thousandto.Code.Logic.FSkinTypeCode.LocalPet); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Pet", Thousandto.Code.Logic.FSkinTypeCode.Pet); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "FlyPet", Thousandto.Code.Logic.FSkinTypeCode.FlyPet); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Custom", Thousandto.Code.Logic.FSkinTypeCode.Custom); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "HuSongObj", Thousandto.Code.Logic.FSkinTypeCode.HuSongObj); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "DanLing", Thousandto.Code.Logic.FSkinTypeCode.DanLing); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "FaBao", Thousandto.Code.Logic.FSkinTypeCode.FaBao); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "MarryChild", Thousandto.Code.Logic.FSkinTypeCode.MarryChild); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Code.Logic.FSkinTypeCode), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCodeLogicFSkinTypeCode(L, (Thousandto.Code.Logic.FSkinTypeCode)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "None")) { translator.PushThousandtoCodeLogicFSkinTypeCode(L, Thousandto.Code.Logic.FSkinTypeCode.None); } else if (LuaAPI.xlua_is_eq_str(L, 1, "LocalPlayer")) { translator.PushThousandtoCodeLogicFSkinTypeCode(L, Thousandto.Code.Logic.FSkinTypeCode.LocalPlayer); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Player")) { translator.PushThousandtoCodeLogicFSkinTypeCode(L, Thousandto.Code.Logic.FSkinTypeCode.Player); } else if (LuaAPI.xlua_is_eq_str(L, 1, "NPC")) { translator.PushThousandtoCodeLogicFSkinTypeCode(L, Thousandto.Code.Logic.FSkinTypeCode.NPC); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Monster")) { translator.PushThousandtoCodeLogicFSkinTypeCode(L, Thousandto.Code.Logic.FSkinTypeCode.Monster); } else if (LuaAPI.xlua_is_eq_str(L, 1, "BossMonster")) { translator.PushThousandtoCodeLogicFSkinTypeCode(L, Thousandto.Code.Logic.FSkinTypeCode.BossMonster); } else if (LuaAPI.xlua_is_eq_str(L, 1, "SpecMonster")) { translator.PushThousandtoCodeLogicFSkinTypeCode(L, Thousandto.Code.Logic.FSkinTypeCode.SpecMonster); } else if (LuaAPI.xlua_is_eq_str(L, 1, "LocalPet")) { translator.PushThousandtoCodeLogicFSkinTypeCode(L, Thousandto.Code.Logic.FSkinTypeCode.LocalPet); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Pet")) { translator.PushThousandtoCodeLogicFSkinTypeCode(L, Thousandto.Code.Logic.FSkinTypeCode.Pet); } else if (LuaAPI.xlua_is_eq_str(L, 1, "FlyPet")) { translator.PushThousandtoCodeLogicFSkinTypeCode(L, Thousandto.Code.Logic.FSkinTypeCode.FlyPet); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Custom")) { translator.PushThousandtoCodeLogicFSkinTypeCode(L, Thousandto.Code.Logic.FSkinTypeCode.Custom); } else if (LuaAPI.xlua_is_eq_str(L, 1, "HuSongObj")) { translator.PushThousandtoCodeLogicFSkinTypeCode(L, Thousandto.Code.Logic.FSkinTypeCode.HuSongObj); } else if (LuaAPI.xlua_is_eq_str(L, 1, "DanLing")) { translator.PushThousandtoCodeLogicFSkinTypeCode(L, Thousandto.Code.Logic.FSkinTypeCode.DanLing); } else if (LuaAPI.xlua_is_eq_str(L, 1, "FaBao")) { translator.PushThousandtoCodeLogicFSkinTypeCode(L, Thousandto.Code.Logic.FSkinTypeCode.FaBao); } else if (LuaAPI.xlua_is_eq_str(L, 1, "MarryChild")) { translator.PushThousandtoCodeLogicFSkinTypeCode(L, Thousandto.Code.Logic.FSkinTypeCode.MarryChild); } else { return LuaAPI.luaL_error(L, "invalid string for Thousandto.Code.Logic.FSkinTypeCode!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Code.Logic.FSkinTypeCode! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCoreAssetModelTypeCodeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Core.Asset.ModelTypeCode), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Core.Asset.ModelTypeCode), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Core.Asset.ModelTypeCode), L, null, 34, 0, 0); Utils.RegisterEnumType(L, typeof(Thousandto.Core.Asset.ModelTypeCode)); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Core.Asset.ModelTypeCode), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCoreAssetModelTypeCode(L, (Thousandto.Core.Asset.ModelTypeCode)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { try { translator.TranslateToEnumToTop(L, typeof(Thousandto.Core.Asset.ModelTypeCode), 1); } catch (System.Exception e) { return LuaAPI.luaL_error(L, "cast to " + typeof(Thousandto.Core.Asset.ModelTypeCode) + " exception:" + e); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Core.Asset.ModelTypeCode! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCodeGlobalAllBattlePropWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Code.Global.AllBattleProp), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Code.Global.AllBattleProp), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Code.Global.AllBattleProp), L, null, 64, 0, 0); Utils.RegisterEnumType(L, typeof(Thousandto.Code.Global.AllBattleProp)); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Code.Global.AllBattleProp), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCodeGlobalAllBattleProp(L, (Thousandto.Code.Global.AllBattleProp)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { try { translator.TranslateToEnumToTop(L, typeof(Thousandto.Code.Global.AllBattleProp), 1); } catch (System.Exception e) { return LuaAPI.luaL_error(L, "cast to " + typeof(Thousandto.Code.Global.AllBattleProp) + " exception:" + e); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Code.Global.AllBattleProp! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCodeGlobalFriendTypeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Code.Global.FriendType), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Code.Global.FriendType), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Code.Global.FriendType), L, null, 8, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Undefine", Thousandto.Code.Global.FriendType.Undefine); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Friend", Thousandto.Code.Global.FriendType.Friend); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Enemy", Thousandto.Code.Global.FriendType.Enemy); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Shield", Thousandto.Code.Global.FriendType.Shield); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Recommend", Thousandto.Code.Global.FriendType.Recommend); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Recent", Thousandto.Code.Global.FriendType.Recent); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Search", Thousandto.Code.Global.FriendType.Search); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Code.Global.FriendType), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCodeGlobalFriendType(L, (Thousandto.Code.Global.FriendType)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Undefine")) { translator.PushThousandtoCodeGlobalFriendType(L, Thousandto.Code.Global.FriendType.Undefine); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Friend")) { translator.PushThousandtoCodeGlobalFriendType(L, Thousandto.Code.Global.FriendType.Friend); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Enemy")) { translator.PushThousandtoCodeGlobalFriendType(L, Thousandto.Code.Global.FriendType.Enemy); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Shield")) { translator.PushThousandtoCodeGlobalFriendType(L, Thousandto.Code.Global.FriendType.Shield); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Recommend")) { translator.PushThousandtoCodeGlobalFriendType(L, Thousandto.Code.Global.FriendType.Recommend); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Recent")) { translator.PushThousandtoCodeGlobalFriendType(L, Thousandto.Code.Global.FriendType.Recent); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Search")) { translator.PushThousandtoCodeGlobalFriendType(L, Thousandto.Code.Global.FriendType.Search); } else { return LuaAPI.luaL_error(L, "invalid string for Thousandto.Code.Global.FriendType!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Code.Global.FriendType! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCodeGlobalPKModeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Code.Global.PKMode), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Code.Global.PKMode), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Code.Global.PKMode), L, null, 7, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "PeaceMode", Thousandto.Code.Global.PKMode.PeaceMode); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "AllMode", Thousandto.Code.Global.PKMode.AllMode); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "SelfServer", Thousandto.Code.Global.PKMode.SelfServer); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "SceneCampMode", Thousandto.Code.Global.PKMode.SceneCampMode); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "GuildMode", Thousandto.Code.Global.PKMode.GuildMode); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Count", Thousandto.Code.Global.PKMode.Count); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Code.Global.PKMode), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCodeGlobalPKMode(L, (Thousandto.Code.Global.PKMode)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "PeaceMode")) { translator.PushThousandtoCodeGlobalPKMode(L, Thousandto.Code.Global.PKMode.PeaceMode); } else if (LuaAPI.xlua_is_eq_str(L, 1, "AllMode")) { translator.PushThousandtoCodeGlobalPKMode(L, Thousandto.Code.Global.PKMode.AllMode); } else if (LuaAPI.xlua_is_eq_str(L, 1, "SelfServer")) { translator.PushThousandtoCodeGlobalPKMode(L, Thousandto.Code.Global.PKMode.SelfServer); } else if (LuaAPI.xlua_is_eq_str(L, 1, "SceneCampMode")) { translator.PushThousandtoCodeGlobalPKMode(L, Thousandto.Code.Global.PKMode.SceneCampMode); } else if (LuaAPI.xlua_is_eq_str(L, 1, "GuildMode")) { translator.PushThousandtoCodeGlobalPKMode(L, Thousandto.Code.Global.PKMode.GuildMode); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Count")) { translator.PushThousandtoCodeGlobalPKMode(L, Thousandto.Code.Global.PKMode.Count); } else { return LuaAPI.luaL_error(L, "invalid string for Thousandto.Code.Global.PKMode!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Code.Global.PKMode! Expect number or string, got + " + lua_type); } return 1; } } public class UITweenerMethodWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UITweener.Method), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UITweener.Method), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UITweener.Method), L, null, 7, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Linear", UITweener.Method.Linear); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "EaseIn", UITweener.Method.EaseIn); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "EaseOut", UITweener.Method.EaseOut); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "EaseInOut", UITweener.Method.EaseInOut); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BounceIn", UITweener.Method.BounceIn); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BounceOut", UITweener.Method.BounceOut); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UITweener.Method), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUITweenerMethod(L, (UITweener.Method)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Linear")) { translator.PushUITweenerMethod(L, UITweener.Method.Linear); } else if (LuaAPI.xlua_is_eq_str(L, 1, "EaseIn")) { translator.PushUITweenerMethod(L, UITweener.Method.EaseIn); } else if (LuaAPI.xlua_is_eq_str(L, 1, "EaseOut")) { translator.PushUITweenerMethod(L, UITweener.Method.EaseOut); } else if (LuaAPI.xlua_is_eq_str(L, 1, "EaseInOut")) { translator.PushUITweenerMethod(L, UITweener.Method.EaseInOut); } else if (LuaAPI.xlua_is_eq_str(L, 1, "BounceIn")) { translator.PushUITweenerMethod(L, UITweener.Method.BounceIn); } else if (LuaAPI.xlua_is_eq_str(L, 1, "BounceOut")) { translator.PushUITweenerMethod(L, UITweener.Method.BounceOut); } else { return LuaAPI.luaL_error(L, "invalid string for UITweener.Method!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UITweener.Method! Expect number or string, got + " + lua_type); } return 1; } } public class UITweenerStyleWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UITweener.Style), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UITweener.Style), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UITweener.Style), L, null, 4, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Once", UITweener.Style.Once); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Loop", UITweener.Style.Loop); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "PingPong", UITweener.Style.PingPong); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UITweener.Style), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUITweenerStyle(L, (UITweener.Style)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Once")) { translator.PushUITweenerStyle(L, UITweener.Style.Once); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Loop")) { translator.PushUITweenerStyle(L, UITweener.Style.Loop); } else if (LuaAPI.xlua_is_eq_str(L, 1, "PingPong")) { translator.PushUITweenerStyle(L, UITweener.Style.PingPong); } else { return LuaAPI.luaL_error(L, "invalid string for UITweener.Style!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UITweener.Style! Expect number or string, got + " + lua_type); } return 1; } } public class UIWidgetPivotWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UIWidget.Pivot), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UIWidget.Pivot), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UIWidget.Pivot), L, null, 10, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "TopLeft", UIWidget.Pivot.TopLeft); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Top", UIWidget.Pivot.Top); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "TopRight", UIWidget.Pivot.TopRight); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Left", UIWidget.Pivot.Left); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Center", UIWidget.Pivot.Center); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Right", UIWidget.Pivot.Right); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BottomLeft", UIWidget.Pivot.BottomLeft); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Bottom", UIWidget.Pivot.Bottom); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BottomRight", UIWidget.Pivot.BottomRight); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UIWidget.Pivot), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUIWidgetPivot(L, (UIWidget.Pivot)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "TopLeft")) { translator.PushUIWidgetPivot(L, UIWidget.Pivot.TopLeft); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Top")) { translator.PushUIWidgetPivot(L, UIWidget.Pivot.Top); } else if (LuaAPI.xlua_is_eq_str(L, 1, "TopRight")) { translator.PushUIWidgetPivot(L, UIWidget.Pivot.TopRight); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Left")) { translator.PushUIWidgetPivot(L, UIWidget.Pivot.Left); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Center")) { translator.PushUIWidgetPivot(L, UIWidget.Pivot.Center); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Right")) { translator.PushUIWidgetPivot(L, UIWidget.Pivot.Right); } else if (LuaAPI.xlua_is_eq_str(L, 1, "BottomLeft")) { translator.PushUIWidgetPivot(L, UIWidget.Pivot.BottomLeft); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Bottom")) { translator.PushUIWidgetPivot(L, UIWidget.Pivot.Bottom); } else if (LuaAPI.xlua_is_eq_str(L, 1, "BottomRight")) { translator.PushUIWidgetPivot(L, UIWidget.Pivot.BottomRight); } else { return LuaAPI.luaL_error(L, "invalid string for UIWidget.Pivot!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UIWidget.Pivot! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCodeLogicMsgBoxInfoTypeCodeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Code.Logic.MsgBoxInfoTypeCode), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Code.Logic.MsgBoxInfoTypeCode), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Code.Logic.MsgBoxInfoTypeCode), L, null, 6, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "None", Thousandto.Code.Logic.MsgBoxInfoTypeCode.None); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "AlwaysLatestBegin", Thousandto.Code.Logic.MsgBoxInfoTypeCode.AlwaysLatestBegin); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "CallTogether", Thousandto.Code.Logic.MsgBoxInfoTypeCode.CallTogether); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ShiTuCall", Thousandto.Code.Logic.MsgBoxInfoTypeCode.ShiTuCall); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "TeamInvite", Thousandto.Code.Logic.MsgBoxInfoTypeCode.TeamInvite); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Code.Logic.MsgBoxInfoTypeCode), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCodeLogicMsgBoxInfoTypeCode(L, (Thousandto.Code.Logic.MsgBoxInfoTypeCode)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "None")) { translator.PushThousandtoCodeLogicMsgBoxInfoTypeCode(L, Thousandto.Code.Logic.MsgBoxInfoTypeCode.None); } else if (LuaAPI.xlua_is_eq_str(L, 1, "AlwaysLatestBegin")) { translator.PushThousandtoCodeLogicMsgBoxInfoTypeCode(L, Thousandto.Code.Logic.MsgBoxInfoTypeCode.AlwaysLatestBegin); } else if (LuaAPI.xlua_is_eq_str(L, 1, "CallTogether")) { translator.PushThousandtoCodeLogicMsgBoxInfoTypeCode(L, Thousandto.Code.Logic.MsgBoxInfoTypeCode.CallTogether); } else if (LuaAPI.xlua_is_eq_str(L, 1, "ShiTuCall")) { translator.PushThousandtoCodeLogicMsgBoxInfoTypeCode(L, Thousandto.Code.Logic.MsgBoxInfoTypeCode.ShiTuCall); } else if (LuaAPI.xlua_is_eq_str(L, 1, "TeamInvite")) { translator.PushThousandtoCodeLogicMsgBoxInfoTypeCode(L, Thousandto.Code.Logic.MsgBoxInfoTypeCode.TeamInvite); } else { return LuaAPI.luaL_error(L, "invalid string for Thousandto.Code.Logic.MsgBoxInfoTypeCode!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Code.Logic.MsgBoxInfoTypeCode! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCodeGlobalMapTypeDefWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Code.Global.MapTypeDef), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Code.Global.MapTypeDef), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Code.Global.MapTypeDef), L, null, 7, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Map", Thousandto.Code.Global.MapTypeDef.Map); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Copy", Thousandto.Code.Global.MapTypeDef.Copy); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "JJC", Thousandto.Code.Global.MapTypeDef.JJC); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "CrossCopy", Thousandto.Code.Global.MapTypeDef.CrossCopy); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "PlanCopy", Thousandto.Code.Global.MapTypeDef.PlanCopy); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "UnDefine", Thousandto.Code.Global.MapTypeDef.UnDefine); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Code.Global.MapTypeDef), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCodeGlobalMapTypeDef(L, (Thousandto.Code.Global.MapTypeDef)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Map")) { translator.PushThousandtoCodeGlobalMapTypeDef(L, Thousandto.Code.Global.MapTypeDef.Map); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Copy")) { translator.PushThousandtoCodeGlobalMapTypeDef(L, Thousandto.Code.Global.MapTypeDef.Copy); } else if (LuaAPI.xlua_is_eq_str(L, 1, "JJC")) { translator.PushThousandtoCodeGlobalMapTypeDef(L, Thousandto.Code.Global.MapTypeDef.JJC); } else if (LuaAPI.xlua_is_eq_str(L, 1, "CrossCopy")) { translator.PushThousandtoCodeGlobalMapTypeDef(L, Thousandto.Code.Global.MapTypeDef.CrossCopy); } else if (LuaAPI.xlua_is_eq_str(L, 1, "PlanCopy")) { translator.PushThousandtoCodeGlobalMapTypeDef(L, Thousandto.Code.Global.MapTypeDef.PlanCopy); } else if (LuaAPI.xlua_is_eq_str(L, 1, "UnDefine")) { translator.PushThousandtoCodeGlobalMapTypeDef(L, Thousandto.Code.Global.MapTypeDef.UnDefine); } else { return LuaAPI.luaL_error(L, "invalid string for Thousandto.Code.Global.MapTypeDef!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Code.Global.MapTypeDef! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCodeLogicSkillSelectFiledTypeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Code.Logic.SkillSelectFiledType), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Code.Logic.SkillSelectFiledType), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Code.Logic.SkillSelectFiledType), L, null, 4, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "None", Thousandto.Code.Logic.SkillSelectFiledType.None); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "SelectDir", Thousandto.Code.Logic.SkillSelectFiledType.SelectDir); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "SelectPos", Thousandto.Code.Logic.SkillSelectFiledType.SelectPos); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Code.Logic.SkillSelectFiledType), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCodeLogicSkillSelectFiledType(L, (Thousandto.Code.Logic.SkillSelectFiledType)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "None")) { translator.PushThousandtoCodeLogicSkillSelectFiledType(L, Thousandto.Code.Logic.SkillSelectFiledType.None); } else if (LuaAPI.xlua_is_eq_str(L, 1, "SelectDir")) { translator.PushThousandtoCodeLogicSkillSelectFiledType(L, Thousandto.Code.Logic.SkillSelectFiledType.SelectDir); } else if (LuaAPI.xlua_is_eq_str(L, 1, "SelectPos")) { translator.PushThousandtoCodeLogicSkillSelectFiledType(L, Thousandto.Code.Logic.SkillSelectFiledType.SelectPos); } else { return LuaAPI.luaL_error(L, "invalid string for Thousandto.Code.Logic.SkillSelectFiledType!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Code.Logic.SkillSelectFiledType! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCodeLogicActionEventCodeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Code.Logic.ActionEventCode), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Code.Logic.ActionEventCode), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Code.Logic.ActionEventCode), L, null, 6, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "CreateChar", Thousandto.Code.Logic.ActionEventCode.CreateChar); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "SelectChar", Thousandto.Code.Logic.ActionEventCode.SelectChar); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "EnterServer", Thousandto.Code.Logic.ActionEventCode.EnterServer); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ChargeSuccess", Thousandto.Code.Logic.ActionEventCode.ChargeSuccess); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ChargeLevel", Thousandto.Code.Logic.ActionEventCode.ChargeLevel); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Code.Logic.ActionEventCode), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCodeLogicActionEventCode(L, (Thousandto.Code.Logic.ActionEventCode)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "CreateChar")) { translator.PushThousandtoCodeLogicActionEventCode(L, Thousandto.Code.Logic.ActionEventCode.CreateChar); } else if (LuaAPI.xlua_is_eq_str(L, 1, "SelectChar")) { translator.PushThousandtoCodeLogicActionEventCode(L, Thousandto.Code.Logic.ActionEventCode.SelectChar); } else if (LuaAPI.xlua_is_eq_str(L, 1, "EnterServer")) { translator.PushThousandtoCodeLogicActionEventCode(L, Thousandto.Code.Logic.ActionEventCode.EnterServer); } else if (LuaAPI.xlua_is_eq_str(L, 1, "ChargeSuccess")) { translator.PushThousandtoCodeLogicActionEventCode(L, Thousandto.Code.Logic.ActionEventCode.ChargeSuccess); } else if (LuaAPI.xlua_is_eq_str(L, 1, "ChargeLevel")) { translator.PushThousandtoCodeLogicActionEventCode(L, Thousandto.Code.Logic.ActionEventCode.ChargeLevel); } else { return LuaAPI.luaL_error(L, "invalid string for Thousandto.Code.Logic.ActionEventCode!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Code.Logic.ActionEventCode! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCodeGlobalItemBigTypeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Code.Global.ItemBigType), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Code.Global.ItemBigType), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Code.Global.ItemBigType), L, null, 6, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "UnDefine", Thousandto.Code.Global.ItemBigType.UnDefine); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "All", Thousandto.Code.Global.ItemBigType.All); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ImmortalEquip", Thousandto.Code.Global.ItemBigType.ImmortalEquip); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Equip", Thousandto.Code.Global.ItemBigType.Equip); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Other", Thousandto.Code.Global.ItemBigType.Other); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Code.Global.ItemBigType), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCodeGlobalItemBigType(L, (Thousandto.Code.Global.ItemBigType)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "UnDefine")) { translator.PushThousandtoCodeGlobalItemBigType(L, Thousandto.Code.Global.ItemBigType.UnDefine); } else if (LuaAPI.xlua_is_eq_str(L, 1, "All")) { translator.PushThousandtoCodeGlobalItemBigType(L, Thousandto.Code.Global.ItemBigType.All); } else if (LuaAPI.xlua_is_eq_str(L, 1, "ImmortalEquip")) { translator.PushThousandtoCodeGlobalItemBigType(L, Thousandto.Code.Global.ItemBigType.ImmortalEquip); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Equip")) { translator.PushThousandtoCodeGlobalItemBigType(L, Thousandto.Code.Global.ItemBigType.Equip); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Other")) { translator.PushThousandtoCodeGlobalItemBigType(L, Thousandto.Code.Global.ItemBigType.Other); } else { return LuaAPI.luaL_error(L, "invalid string for Thousandto.Code.Global.ItemBigType!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Code.Global.ItemBigType! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCodeGlobalContainerTypeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Code.Global.ContainerType), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Code.Global.ContainerType), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Code.Global.ContainerType), L, null, 9, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "UnDefine", Thousandto.Code.Global.ContainerType.UnDefine); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ITEM_LOCATION_BAG", Thousandto.Code.Global.ContainerType.ITEM_LOCATION_BAG); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ITEM_LOCATION_EQUIP", Thousandto.Code.Global.ContainerType.ITEM_LOCATION_EQUIP); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ITEM_LOCATION_STORAGE", Thousandto.Code.Global.ContainerType.ITEM_LOCATION_STORAGE); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ITEM_LOCATION_CLEAR", Thousandto.Code.Global.ContainerType.ITEM_LOCATION_CLEAR); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ITEM_LOCATION_BACKEQUIP", Thousandto.Code.Global.ContainerType.ITEM_LOCATION_BACKEQUIP); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ITEM_LOCATION_IMMORTAL", Thousandto.Code.Global.ContainerType.ITEM_LOCATION_IMMORTAL); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ITEM_LOCATION_COUNT", Thousandto.Code.Global.ContainerType.ITEM_LOCATION_COUNT); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Code.Global.ContainerType), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCodeGlobalContainerType(L, (Thousandto.Code.Global.ContainerType)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "UnDefine")) { translator.PushThousandtoCodeGlobalContainerType(L, Thousandto.Code.Global.ContainerType.UnDefine); } else if (LuaAPI.xlua_is_eq_str(L, 1, "ITEM_LOCATION_BAG")) { translator.PushThousandtoCodeGlobalContainerType(L, Thousandto.Code.Global.ContainerType.ITEM_LOCATION_BAG); } else if (LuaAPI.xlua_is_eq_str(L, 1, "ITEM_LOCATION_EQUIP")) { translator.PushThousandtoCodeGlobalContainerType(L, Thousandto.Code.Global.ContainerType.ITEM_LOCATION_EQUIP); } else if (LuaAPI.xlua_is_eq_str(L, 1, "ITEM_LOCATION_STORAGE")) { translator.PushThousandtoCodeGlobalContainerType(L, Thousandto.Code.Global.ContainerType.ITEM_LOCATION_STORAGE); } else if (LuaAPI.xlua_is_eq_str(L, 1, "ITEM_LOCATION_CLEAR")) { translator.PushThousandtoCodeGlobalContainerType(L, Thousandto.Code.Global.ContainerType.ITEM_LOCATION_CLEAR); } else if (LuaAPI.xlua_is_eq_str(L, 1, "ITEM_LOCATION_BACKEQUIP")) { translator.PushThousandtoCodeGlobalContainerType(L, Thousandto.Code.Global.ContainerType.ITEM_LOCATION_BACKEQUIP); } else if (LuaAPI.xlua_is_eq_str(L, 1, "ITEM_LOCATION_IMMORTAL")) { translator.PushThousandtoCodeGlobalContainerType(L, Thousandto.Code.Global.ContainerType.ITEM_LOCATION_IMMORTAL); } else if (LuaAPI.xlua_is_eq_str(L, 1, "ITEM_LOCATION_COUNT")) { translator.PushThousandtoCodeGlobalContainerType(L, Thousandto.Code.Global.ContainerType.ITEM_LOCATION_COUNT); } else { return LuaAPI.luaL_error(L, "invalid string for Thousandto.Code.Global.ContainerType!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Code.Global.ContainerType! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCodeGlobalItemTipsLocationWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Code.Global.ItemTipsLocation), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Code.Global.ItemTipsLocation), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Code.Global.ItemTipsLocation), L, null, 19, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Defult", Thousandto.Code.Global.ItemTipsLocation.Defult); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Bag", Thousandto.Code.Global.ItemTipsLocation.Bag); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Equip", Thousandto.Code.Global.ItemTipsLocation.Equip); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "PutInStorage", Thousandto.Code.Global.ItemTipsLocation.PutInStorage); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "OutStorage", Thousandto.Code.Global.ItemTipsLocation.OutStorage); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "PutInSell", Thousandto.Code.Global.ItemTipsLocation.PutInSell); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "OutSell", Thousandto.Code.Global.ItemTipsLocation.OutSell); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "LingTi", Thousandto.Code.Global.ItemTipsLocation.LingTi); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "EquipSelect", Thousandto.Code.Global.ItemTipsLocation.EquipSelect); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Market", Thousandto.Code.Global.ItemTipsLocation.Market); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "XJTreasure", Thousandto.Code.Global.ItemTipsLocation.XJTreasure); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Nomal", Thousandto.Code.Global.ItemTipsLocation.Nomal); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "PutinGuildStore", Thousandto.Code.Global.ItemTipsLocation.PutinGuildStore); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "OutGuildStore", Thousandto.Code.Global.ItemTipsLocation.OutGuildStore); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Synth", Thousandto.Code.Global.ItemTipsLocation.Synth); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "SynthPutOut", Thousandto.Code.Global.ItemTipsLocation.SynthPutOut); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "EquipDisplay", Thousandto.Code.Global.ItemTipsLocation.EquipDisplay); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Count", Thousandto.Code.Global.ItemTipsLocation.Count); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Code.Global.ItemTipsLocation), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCodeGlobalItemTipsLocation(L, (Thousandto.Code.Global.ItemTipsLocation)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Defult")) { translator.PushThousandtoCodeGlobalItemTipsLocation(L, Thousandto.Code.Global.ItemTipsLocation.Defult); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Bag")) { translator.PushThousandtoCodeGlobalItemTipsLocation(L, Thousandto.Code.Global.ItemTipsLocation.Bag); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Equip")) { translator.PushThousandtoCodeGlobalItemTipsLocation(L, Thousandto.Code.Global.ItemTipsLocation.Equip); } else if (LuaAPI.xlua_is_eq_str(L, 1, "PutInStorage")) { translator.PushThousandtoCodeGlobalItemTipsLocation(L, Thousandto.Code.Global.ItemTipsLocation.PutInStorage); } else if (LuaAPI.xlua_is_eq_str(L, 1, "OutStorage")) { translator.PushThousandtoCodeGlobalItemTipsLocation(L, Thousandto.Code.Global.ItemTipsLocation.OutStorage); } else if (LuaAPI.xlua_is_eq_str(L, 1, "PutInSell")) { translator.PushThousandtoCodeGlobalItemTipsLocation(L, Thousandto.Code.Global.ItemTipsLocation.PutInSell); } else if (LuaAPI.xlua_is_eq_str(L, 1, "OutSell")) { translator.PushThousandtoCodeGlobalItemTipsLocation(L, Thousandto.Code.Global.ItemTipsLocation.OutSell); } else if (LuaAPI.xlua_is_eq_str(L, 1, "LingTi")) { translator.PushThousandtoCodeGlobalItemTipsLocation(L, Thousandto.Code.Global.ItemTipsLocation.LingTi); } else if (LuaAPI.xlua_is_eq_str(L, 1, "EquipSelect")) { translator.PushThousandtoCodeGlobalItemTipsLocation(L, Thousandto.Code.Global.ItemTipsLocation.EquipSelect); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Market")) { translator.PushThousandtoCodeGlobalItemTipsLocation(L, Thousandto.Code.Global.ItemTipsLocation.Market); } else if (LuaAPI.xlua_is_eq_str(L, 1, "XJTreasure")) { translator.PushThousandtoCodeGlobalItemTipsLocation(L, Thousandto.Code.Global.ItemTipsLocation.XJTreasure); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Nomal")) { translator.PushThousandtoCodeGlobalItemTipsLocation(L, Thousandto.Code.Global.ItemTipsLocation.Nomal); } else if (LuaAPI.xlua_is_eq_str(L, 1, "PutinGuildStore")) { translator.PushThousandtoCodeGlobalItemTipsLocation(L, Thousandto.Code.Global.ItemTipsLocation.PutinGuildStore); } else if (LuaAPI.xlua_is_eq_str(L, 1, "OutGuildStore")) { translator.PushThousandtoCodeGlobalItemTipsLocation(L, Thousandto.Code.Global.ItemTipsLocation.OutGuildStore); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Synth")) { translator.PushThousandtoCodeGlobalItemTipsLocation(L, Thousandto.Code.Global.ItemTipsLocation.Synth); } else if (LuaAPI.xlua_is_eq_str(L, 1, "SynthPutOut")) { translator.PushThousandtoCodeGlobalItemTipsLocation(L, Thousandto.Code.Global.ItemTipsLocation.SynthPutOut); } else if (LuaAPI.xlua_is_eq_str(L, 1, "EquipDisplay")) { translator.PushThousandtoCodeGlobalItemTipsLocation(L, Thousandto.Code.Global.ItemTipsLocation.EquipDisplay); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Count")) { translator.PushThousandtoCodeGlobalItemTipsLocation(L, Thousandto.Code.Global.ItemTipsLocation.Count); } else { return LuaAPI.luaL_error(L, "invalid string for Thousandto.Code.Global.ItemTipsLocation!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Code.Global.ItemTipsLocation! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoPluginsCommonUIFormRegionWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Plugins.Common.UIFormRegion), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Plugins.Common.UIFormRegion), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Plugins.Common.UIFormRegion), L, null, 6, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "NoticRegion", Thousandto.Plugins.Common.UIFormRegion.NoticRegion); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "TopRegion", Thousandto.Plugins.Common.UIFormRegion.TopRegion); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "MiddleRegion", Thousandto.Plugins.Common.UIFormRegion.MiddleRegion); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "MainRegion", Thousandto.Plugins.Common.UIFormRegion.MainRegion); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BottomRegion", Thousandto.Plugins.Common.UIFormRegion.BottomRegion); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Plugins.Common.UIFormRegion), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoPluginsCommonUIFormRegion(L, (Thousandto.Plugins.Common.UIFormRegion)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "NoticRegion")) { translator.PushThousandtoPluginsCommonUIFormRegion(L, Thousandto.Plugins.Common.UIFormRegion.NoticRegion); } else if (LuaAPI.xlua_is_eq_str(L, 1, "TopRegion")) { translator.PushThousandtoPluginsCommonUIFormRegion(L, Thousandto.Plugins.Common.UIFormRegion.TopRegion); } else if (LuaAPI.xlua_is_eq_str(L, 1, "MiddleRegion")) { translator.PushThousandtoPluginsCommonUIFormRegion(L, Thousandto.Plugins.Common.UIFormRegion.MiddleRegion); } else if (LuaAPI.xlua_is_eq_str(L, 1, "MainRegion")) { translator.PushThousandtoPluginsCommonUIFormRegion(L, Thousandto.Plugins.Common.UIFormRegion.MainRegion); } else if (LuaAPI.xlua_is_eq_str(L, 1, "BottomRegion")) { translator.PushThousandtoPluginsCommonUIFormRegion(L, Thousandto.Plugins.Common.UIFormRegion.BottomRegion); } else { return LuaAPI.luaL_error(L, "invalid string for Thousandto.Plugins.Common.UIFormRegion!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Plugins.Common.UIFormRegion! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCodeLogicGameSettingKeyCodeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Code.Logic.GameSettingKeyCode), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Code.Logic.GameSettingKeyCode), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Code.Logic.GameSettingKeyCode), L, null, 118, 0, 0); Utils.RegisterEnumType(L, typeof(Thousandto.Code.Logic.GameSettingKeyCode)); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Code.Logic.GameSettingKeyCode), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCodeLogicGameSettingKeyCode(L, (Thousandto.Code.Logic.GameSettingKeyCode)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { try { translator.TranslateToEnumToTop(L, typeof(Thousandto.Code.Logic.GameSettingKeyCode), 1); } catch (System.Exception e) { return LuaAPI.luaL_error(L, "cast to " + typeof(Thousandto.Code.Logic.GameSettingKeyCode) + " exception:" + e); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Code.Logic.GameSettingKeyCode! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCodeLogicLocalPlayerBTTaskBDTaskTargetTypeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Code.Logic.LocalPlayerBT.TaskBD.TaskTargetType), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Code.Logic.LocalPlayerBT.TaskBD.TaskTargetType), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Code.Logic.LocalPlayerBT.TaskBD.TaskTargetType), L, null, 8, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Undefine", Thousandto.Code.Logic.LocalPlayerBT.TaskBD.TaskTargetType.Undefine); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "TalkToNpc", Thousandto.Code.Logic.LocalPlayerBT.TaskBD.TaskTargetType.TalkToNpc); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "HitMonster", Thousandto.Code.Logic.LocalPlayerBT.TaskBD.TaskTargetType.HitMonster); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Collect", Thousandto.Code.Logic.LocalPlayerBT.TaskBD.TaskTargetType.Collect); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ArrivePos", Thousandto.Code.Logic.LocalPlayerBT.TaskBD.TaskTargetType.ArrivePos); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ArrivePosEx", Thousandto.Code.Logic.LocalPlayerBT.TaskBD.TaskTargetType.ArrivePosEx); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ArriveToAnim", Thousandto.Code.Logic.LocalPlayerBT.TaskBD.TaskTargetType.ArriveToAnim); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Code.Logic.LocalPlayerBT.TaskBD.TaskTargetType), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCodeLogicLocalPlayerBTTaskBDTaskTargetType(L, (Thousandto.Code.Logic.LocalPlayerBT.TaskBD.TaskTargetType)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Undefine")) { translator.PushThousandtoCodeLogicLocalPlayerBTTaskBDTaskTargetType(L, Thousandto.Code.Logic.LocalPlayerBT.TaskBD.TaskTargetType.Undefine); } else if (LuaAPI.xlua_is_eq_str(L, 1, "TalkToNpc")) { translator.PushThousandtoCodeLogicLocalPlayerBTTaskBDTaskTargetType(L, Thousandto.Code.Logic.LocalPlayerBT.TaskBD.TaskTargetType.TalkToNpc); } else if (LuaAPI.xlua_is_eq_str(L, 1, "HitMonster")) { translator.PushThousandtoCodeLogicLocalPlayerBTTaskBDTaskTargetType(L, Thousandto.Code.Logic.LocalPlayerBT.TaskBD.TaskTargetType.HitMonster); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Collect")) { translator.PushThousandtoCodeLogicLocalPlayerBTTaskBDTaskTargetType(L, Thousandto.Code.Logic.LocalPlayerBT.TaskBD.TaskTargetType.Collect); } else if (LuaAPI.xlua_is_eq_str(L, 1, "ArrivePos")) { translator.PushThousandtoCodeLogicLocalPlayerBTTaskBDTaskTargetType(L, Thousandto.Code.Logic.LocalPlayerBT.TaskBD.TaskTargetType.ArrivePos); } else if (LuaAPI.xlua_is_eq_str(L, 1, "ArrivePosEx")) { translator.PushThousandtoCodeLogicLocalPlayerBTTaskBDTaskTargetType(L, Thousandto.Code.Logic.LocalPlayerBT.TaskBD.TaskTargetType.ArrivePosEx); } else if (LuaAPI.xlua_is_eq_str(L, 1, "ArriveToAnim")) { translator.PushThousandtoCodeLogicLocalPlayerBTTaskBDTaskTargetType(L, Thousandto.Code.Logic.LocalPlayerBT.TaskBD.TaskTargetType.ArriveToAnim); } else { return LuaAPI.luaL_error(L, "invalid string for Thousandto.Code.Logic.LocalPlayerBT.TaskBD.TaskTargetType!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Code.Logic.LocalPlayerBT.TaskBD.TaskTargetType! Expect number or string, got + " + lua_type); } return 1; } } public class UnityEngineWrapModeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UnityEngine.WrapMode), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UnityEngine.WrapMode), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UnityEngine.WrapMode), L, null, 7, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Once", UnityEngine.WrapMode.Once); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Loop", UnityEngine.WrapMode.Loop); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "PingPong", UnityEngine.WrapMode.PingPong); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Default", UnityEngine.WrapMode.Default); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ClampForever", UnityEngine.WrapMode.ClampForever); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Clamp", UnityEngine.WrapMode.Clamp); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UnityEngine.WrapMode), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUnityEngineWrapMode(L, (UnityEngine.WrapMode)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Once")) { translator.PushUnityEngineWrapMode(L, UnityEngine.WrapMode.Once); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Loop")) { translator.PushUnityEngineWrapMode(L, UnityEngine.WrapMode.Loop); } else if (LuaAPI.xlua_is_eq_str(L, 1, "PingPong")) { translator.PushUnityEngineWrapMode(L, UnityEngine.WrapMode.PingPong); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Default")) { translator.PushUnityEngineWrapMode(L, UnityEngine.WrapMode.Default); } else if (LuaAPI.xlua_is_eq_str(L, 1, "ClampForever")) { translator.PushUnityEngineWrapMode(L, UnityEngine.WrapMode.ClampForever); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Clamp")) { translator.PushUnityEngineWrapMode(L, UnityEngine.WrapMode.Clamp); } else { return LuaAPI.luaL_error(L, "invalid string for UnityEngine.WrapMode!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UnityEngine.WrapMode! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCoreAssetAnimationPartTypeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Core.Asset.AnimationPartType), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Core.Asset.AnimationPartType), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Core.Asset.AnimationPartType), L, null, 4, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "AllBody", Thousandto.Core.Asset.AnimationPartType.AllBody); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "UpBody", Thousandto.Core.Asset.AnimationPartType.UpBody); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "LowerBody", Thousandto.Core.Asset.AnimationPartType.LowerBody); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Core.Asset.AnimationPartType), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCoreAssetAnimationPartType(L, (Thousandto.Core.Asset.AnimationPartType)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "AllBody")) { translator.PushThousandtoCoreAssetAnimationPartType(L, Thousandto.Core.Asset.AnimationPartType.AllBody); } else if (LuaAPI.xlua_is_eq_str(L, 1, "UpBody")) { translator.PushThousandtoCoreAssetAnimationPartType(L, Thousandto.Core.Asset.AnimationPartType.UpBody); } else if (LuaAPI.xlua_is_eq_str(L, 1, "LowerBody")) { translator.PushThousandtoCoreAssetAnimationPartType(L, Thousandto.Core.Asset.AnimationPartType.LowerBody); } else { return LuaAPI.luaL_error(L, "invalid string for Thousandto.Core.Asset.AnimationPartType!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Core.Asset.AnimationPartType! Expect number or string, got + " + lua_type); } return 1; } } public class UnityEngineAnimationCullingTypeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UnityEngine.AnimationCullingType), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UnityEngine.AnimationCullingType), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UnityEngine.AnimationCullingType), L, null, 5, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "AlwaysAnimate", UnityEngine.AnimationCullingType.AlwaysAnimate); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BasedOnRenderers", UnityEngine.AnimationCullingType.BasedOnRenderers); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UnityEngine.AnimationCullingType), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUnityEngineAnimationCullingType(L, (UnityEngine.AnimationCullingType)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "AlwaysAnimate")) { translator.PushUnityEngineAnimationCullingType(L, UnityEngine.AnimationCullingType.AlwaysAnimate); } else if (LuaAPI.xlua_is_eq_str(L, 1, "BasedOnRenderers")) { translator.PushUnityEngineAnimationCullingType(L, UnityEngine.AnimationCullingType.BasedOnRenderers); } else { return LuaAPI.luaL_error(L, "invalid string for UnityEngine.AnimationCullingType!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UnityEngine.AnimationCullingType! Expect number or string, got + " + lua_type); } return 1; } } public class UnityEngineAnimatorCullingModeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UnityEngine.AnimatorCullingMode), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UnityEngine.AnimatorCullingMode), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UnityEngine.AnimatorCullingMode), L, null, 5, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "AlwaysAnimate", UnityEngine.AnimatorCullingMode.AlwaysAnimate); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "CullUpdateTransforms", UnityEngine.AnimatorCullingMode.CullUpdateTransforms); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "CullCompletely", UnityEngine.AnimatorCullingMode.CullCompletely); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UnityEngine.AnimatorCullingMode), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUnityEngineAnimatorCullingMode(L, (UnityEngine.AnimatorCullingMode)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "AlwaysAnimate")) { translator.PushUnityEngineAnimatorCullingMode(L, UnityEngine.AnimatorCullingMode.AlwaysAnimate); } else if (LuaAPI.xlua_is_eq_str(L, 1, "CullUpdateTransforms")) { translator.PushUnityEngineAnimatorCullingMode(L, UnityEngine.AnimatorCullingMode.CullUpdateTransforms); } else if (LuaAPI.xlua_is_eq_str(L, 1, "CullCompletely")) { translator.PushUnityEngineAnimatorCullingMode(L, UnityEngine.AnimatorCullingMode.CullCompletely); } else { return LuaAPI.luaL_error(L, "invalid string for UnityEngine.AnimatorCullingMode!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UnityEngine.AnimatorCullingMode! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCoreAssetEntityStateIDWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Core.Asset.EntityStateID), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Core.Asset.EntityStateID), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Core.Asset.EntityStateID), L, null, 27, 0, 0); Utils.RegisterEnumType(L, typeof(Thousandto.Core.Asset.EntityStateID)); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Core.Asset.EntityStateID), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCoreAssetEntityStateID(L, (Thousandto.Core.Asset.EntityStateID)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { try { translator.TranslateToEnumToTop(L, typeof(Thousandto.Core.Asset.EntityStateID), 1); } catch (System.Exception e) { return LuaAPI.luaL_error(L, "cast to " + typeof(Thousandto.Core.Asset.EntityStateID) + " exception:" + e); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Core.Asset.EntityStateID! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCoreAssetVFXPlayStateWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Core.Asset.VFXPlayState), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Core.Asset.VFXPlayState), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Core.Asset.VFXPlayState), L, null, 6, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "None", Thousandto.Core.Asset.VFXPlayState.None); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Create", Thousandto.Core.Asset.VFXPlayState.Create); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Playing", Thousandto.Core.Asset.VFXPlayState.Playing); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "PlayFinish", Thousandto.Core.Asset.VFXPlayState.PlayFinish); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Destory", Thousandto.Core.Asset.VFXPlayState.Destory); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Core.Asset.VFXPlayState), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCoreAssetVFXPlayState(L, (Thousandto.Core.Asset.VFXPlayState)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "None")) { translator.PushThousandtoCoreAssetVFXPlayState(L, Thousandto.Core.Asset.VFXPlayState.None); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Create")) { translator.PushThousandtoCoreAssetVFXPlayState(L, Thousandto.Core.Asset.VFXPlayState.Create); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Playing")) { translator.PushThousandtoCoreAssetVFXPlayState(L, Thousandto.Core.Asset.VFXPlayState.Playing); } else if (LuaAPI.xlua_is_eq_str(L, 1, "PlayFinish")) { translator.PushThousandtoCoreAssetVFXPlayState(L, Thousandto.Core.Asset.VFXPlayState.PlayFinish); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Destory")) { translator.PushThousandtoCoreAssetVFXPlayState(L, Thousandto.Core.Asset.VFXPlayState.Destory); } else { return LuaAPI.luaL_error(L, "invalid string for Thousandto.Core.Asset.VFXPlayState!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Core.Asset.VFXPlayState! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoPluginsCommonUIFormTypeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Plugins.Common.UIFormType), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Plugins.Common.UIFormType), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Plugins.Common.UIFormType), L, null, 3, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Normal", Thousandto.Plugins.Common.UIFormType.Normal); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Hint", Thousandto.Plugins.Common.UIFormType.Hint); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Plugins.Common.UIFormType), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoPluginsCommonUIFormType(L, (Thousandto.Plugins.Common.UIFormType)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Normal")) { translator.PushThousandtoPluginsCommonUIFormType(L, Thousandto.Plugins.Common.UIFormType.Normal); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Hint")) { translator.PushThousandtoPluginsCommonUIFormType(L, Thousandto.Plugins.Common.UIFormType.Hint); } else { return LuaAPI.luaL_error(L, "invalid string for Thousandto.Plugins.Common.UIFormType!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Plugins.Common.UIFormType! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCodeLogicMsgInfoPriorityWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Code.Logic.MsgInfoPriority), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Code.Logic.MsgInfoPriority), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Code.Logic.MsgInfoPriority), L, null, 6, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Default", Thousandto.Code.Logic.MsgInfoPriority.Default); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Low", Thousandto.Code.Logic.MsgInfoPriority.Low); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Normal", Thousandto.Code.Logic.MsgInfoPriority.Normal); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "High", Thousandto.Code.Logic.MsgInfoPriority.High); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Highest", Thousandto.Code.Logic.MsgInfoPriority.Highest); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Code.Logic.MsgInfoPriority), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCodeLogicMsgInfoPriority(L, (Thousandto.Code.Logic.MsgInfoPriority)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Default")) { translator.PushThousandtoCodeLogicMsgInfoPriority(L, Thousandto.Code.Logic.MsgInfoPriority.Default); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Low")) { translator.PushThousandtoCodeLogicMsgInfoPriority(L, Thousandto.Code.Logic.MsgInfoPriority.Low); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Normal")) { translator.PushThousandtoCodeLogicMsgInfoPriority(L, Thousandto.Code.Logic.MsgInfoPriority.Normal); } else if (LuaAPI.xlua_is_eq_str(L, 1, "High")) { translator.PushThousandtoCodeLogicMsgInfoPriority(L, Thousandto.Code.Logic.MsgInfoPriority.High); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Highest")) { translator.PushThousandtoCodeLogicMsgInfoPriority(L, Thousandto.Code.Logic.MsgInfoPriority.Highest); } else { return LuaAPI.luaL_error(L, "invalid string for Thousandto.Code.Logic.MsgInfoPriority!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Code.Logic.MsgInfoPriority! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCodeGlobalRoleBaseAttributeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Code.Global.RoleBaseAttribute), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Code.Global.RoleBaseAttribute), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Code.Global.RoleBaseAttribute), L, null, 44, 0, 0); Utils.RegisterEnumType(L, typeof(Thousandto.Code.Global.RoleBaseAttribute)); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Code.Global.RoleBaseAttribute), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCodeGlobalRoleBaseAttribute(L, (Thousandto.Code.Global.RoleBaseAttribute)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { try { translator.TranslateToEnumToTop(L, typeof(Thousandto.Code.Global.RoleBaseAttribute), 1); } catch (System.Exception e) { return LuaAPI.luaL_error(L, "cast to " + typeof(Thousandto.Code.Global.RoleBaseAttribute) + " exception:" + e); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Code.Global.RoleBaseAttribute! Expect number or string, got + " + lua_type); } return 1; } } public class UnityEngineCameraMonoOrStereoscopicEyeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UnityEngine.Camera.MonoOrStereoscopicEye), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UnityEngine.Camera.MonoOrStereoscopicEye), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UnityEngine.Camera.MonoOrStereoscopicEye), L, null, 4, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Left", UnityEngine.Camera.MonoOrStereoscopicEye.Left); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Right", UnityEngine.Camera.MonoOrStereoscopicEye.Right); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Mono", UnityEngine.Camera.MonoOrStereoscopicEye.Mono); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UnityEngine.Camera.MonoOrStereoscopicEye), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUnityEngineCameraMonoOrStereoscopicEye(L, (UnityEngine.Camera.MonoOrStereoscopicEye)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Left")) { translator.PushUnityEngineCameraMonoOrStereoscopicEye(L, UnityEngine.Camera.MonoOrStereoscopicEye.Left); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Right")) { translator.PushUnityEngineCameraMonoOrStereoscopicEye(L, UnityEngine.Camera.MonoOrStereoscopicEye.Right); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Mono")) { translator.PushUnityEngineCameraMonoOrStereoscopicEye(L, UnityEngine.Camera.MonoOrStereoscopicEye.Mono); } else { return LuaAPI.luaL_error(L, "invalid string for UnityEngine.Camera.MonoOrStereoscopicEye!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UnityEngine.Camera.MonoOrStereoscopicEye! Expect number or string, got + " + lua_type); } return 1; } } public class UnityEngineCameraStereoscopicEyeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UnityEngine.Camera.StereoscopicEye), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UnityEngine.Camera.StereoscopicEye), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UnityEngine.Camera.StereoscopicEye), L, null, 3, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Left", UnityEngine.Camera.StereoscopicEye.Left); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Right", UnityEngine.Camera.StereoscopicEye.Right); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UnityEngine.Camera.StereoscopicEye), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUnityEngineCameraStereoscopicEye(L, (UnityEngine.Camera.StereoscopicEye)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Left")) { translator.PushUnityEngineCameraStereoscopicEye(L, UnityEngine.Camera.StereoscopicEye.Left); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Right")) { translator.PushUnityEngineCameraStereoscopicEye(L, UnityEngine.Camera.StereoscopicEye.Right); } else { return LuaAPI.luaL_error(L, "invalid string for UnityEngine.Camera.StereoscopicEye!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UnityEngine.Camera.StereoscopicEye! Expect number or string, got + " + lua_type); } return 1; } } public class UIWidgetAspectRatioSourceWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UIWidget.AspectRatioSource), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UIWidget.AspectRatioSource), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UIWidget.AspectRatioSource), L, null, 4, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Free", UIWidget.AspectRatioSource.Free); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BasedOnWidth", UIWidget.AspectRatioSource.BasedOnWidth); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BasedOnHeight", UIWidget.AspectRatioSource.BasedOnHeight); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UIWidget.AspectRatioSource), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUIWidgetAspectRatioSource(L, (UIWidget.AspectRatioSource)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Free")) { translator.PushUIWidgetAspectRatioSource(L, UIWidget.AspectRatioSource.Free); } else if (LuaAPI.xlua_is_eq_str(L, 1, "BasedOnWidth")) { translator.PushUIWidgetAspectRatioSource(L, UIWidget.AspectRatioSource.BasedOnWidth); } else if (LuaAPI.xlua_is_eq_str(L, 1, "BasedOnHeight")) { translator.PushUIWidgetAspectRatioSource(L, UIWidget.AspectRatioSource.BasedOnHeight); } else { return LuaAPI.luaL_error(L, "invalid string for UIWidget.AspectRatioSource!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UIWidget.AspectRatioSource! Expect number or string, got + " + lua_type); } return 1; } } public class UnityEngineCameraGateFitModeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UnityEngine.Camera.GateFitMode), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UnityEngine.Camera.GateFitMode), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UnityEngine.Camera.GateFitMode), L, null, 6, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Vertical", UnityEngine.Camera.GateFitMode.Vertical); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Horizontal", UnityEngine.Camera.GateFitMode.Horizontal); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Fill", UnityEngine.Camera.GateFitMode.Fill); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Overscan", UnityEngine.Camera.GateFitMode.Overscan); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "None", UnityEngine.Camera.GateFitMode.None); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UnityEngine.Camera.GateFitMode), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUnityEngineCameraGateFitMode(L, (UnityEngine.Camera.GateFitMode)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Vertical")) { translator.PushUnityEngineCameraGateFitMode(L, UnityEngine.Camera.GateFitMode.Vertical); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Horizontal")) { translator.PushUnityEngineCameraGateFitMode(L, UnityEngine.Camera.GateFitMode.Horizontal); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Fill")) { translator.PushUnityEngineCameraGateFitMode(L, UnityEngine.Camera.GateFitMode.Fill); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Overscan")) { translator.PushUnityEngineCameraGateFitMode(L, UnityEngine.Camera.GateFitMode.Overscan); } else if (LuaAPI.xlua_is_eq_str(L, 1, "None")) { translator.PushUnityEngineCameraGateFitMode(L, UnityEngine.Camera.GateFitMode.None); } else { return LuaAPI.luaL_error(L, "invalid string for UnityEngine.Camera.GateFitMode!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UnityEngine.Camera.GateFitMode! Expect number or string, got + " + lua_type); } return 1; } } public class UILabelCrispnessWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UILabel.Crispness), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UILabel.Crispness), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UILabel.Crispness), L, null, 4, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Never", UILabel.Crispness.Never); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "OnDesktop", UILabel.Crispness.OnDesktop); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Always", UILabel.Crispness.Always); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UILabel.Crispness), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUILabelCrispness(L, (UILabel.Crispness)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Never")) { translator.PushUILabelCrispness(L, UILabel.Crispness.Never); } else if (LuaAPI.xlua_is_eq_str(L, 1, "OnDesktop")) { translator.PushUILabelCrispness(L, UILabel.Crispness.OnDesktop); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Always")) { translator.PushUILabelCrispness(L, UILabel.Crispness.Always); } else { return LuaAPI.luaL_error(L, "invalid string for UILabel.Crispness!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UILabel.Crispness! Expect number or string, got + " + lua_type); } return 1; } } public class UILabelOverflowWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UILabel.Overflow), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UILabel.Overflow), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UILabel.Overflow), L, null, 5, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ShrinkContent", UILabel.Overflow.ShrinkContent); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ClampContent", UILabel.Overflow.ClampContent); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ResizeFreely", UILabel.Overflow.ResizeFreely); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ResizeHeight", UILabel.Overflow.ResizeHeight); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UILabel.Overflow), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUILabelOverflow(L, (UILabel.Overflow)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "ShrinkContent")) { translator.PushUILabelOverflow(L, UILabel.Overflow.ShrinkContent); } else if (LuaAPI.xlua_is_eq_str(L, 1, "ClampContent")) { translator.PushUILabelOverflow(L, UILabel.Overflow.ClampContent); } else if (LuaAPI.xlua_is_eq_str(L, 1, "ResizeFreely")) { translator.PushUILabelOverflow(L, UILabel.Overflow.ResizeFreely); } else if (LuaAPI.xlua_is_eq_str(L, 1, "ResizeHeight")) { translator.PushUILabelOverflow(L, UILabel.Overflow.ResizeHeight); } else { return LuaAPI.luaL_error(L, "invalid string for UILabel.Overflow!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UILabel.Overflow! Expect number or string, got + " + lua_type); } return 1; } } public class UILabelEffectWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UILabel.Effect), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UILabel.Effect), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UILabel.Effect), L, null, 5, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "None", UILabel.Effect.None); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Shadow", UILabel.Effect.Shadow); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Outline", UILabel.Effect.Outline); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Outline8", UILabel.Effect.Outline8); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UILabel.Effect), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUILabelEffect(L, (UILabel.Effect)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "None")) { translator.PushUILabelEffect(L, UILabel.Effect.None); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Shadow")) { translator.PushUILabelEffect(L, UILabel.Effect.Shadow); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Outline")) { translator.PushUILabelEffect(L, UILabel.Effect.Outline); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Outline8")) { translator.PushUILabelEffect(L, UILabel.Effect.Outline8); } else { return LuaAPI.luaL_error(L, "invalid string for UILabel.Effect!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UILabel.Effect! Expect number or string, got + " + lua_type); } return 1; } } public class UIInputOnReturnKeyWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UIInput.OnReturnKey), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UIInput.OnReturnKey), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UIInput.OnReturnKey), L, null, 4, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Default", UIInput.OnReturnKey.Default); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Submit", UIInput.OnReturnKey.Submit); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "NewLine", UIInput.OnReturnKey.NewLine); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UIInput.OnReturnKey), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUIInputOnReturnKey(L, (UIInput.OnReturnKey)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Default")) { translator.PushUIInputOnReturnKey(L, UIInput.OnReturnKey.Default); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Submit")) { translator.PushUIInputOnReturnKey(L, UIInput.OnReturnKey.Submit); } else if (LuaAPI.xlua_is_eq_str(L, 1, "NewLine")) { translator.PushUIInputOnReturnKey(L, UIInput.OnReturnKey.NewLine); } else { return LuaAPI.luaL_error(L, "invalid string for UIInput.OnReturnKey!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UIInput.OnReturnKey! Expect number or string, got + " + lua_type); } return 1; } } public class UIInputKeyboardTypeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UIInput.KeyboardType), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UIInput.KeyboardType), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UIInput.KeyboardType), L, null, 9, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Default", UIInput.KeyboardType.Default); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ASCIICapable", UIInput.KeyboardType.ASCIICapable); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "NumbersAndPunctuation", UIInput.KeyboardType.NumbersAndPunctuation); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "URL", UIInput.KeyboardType.URL); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "NumberPad", UIInput.KeyboardType.NumberPad); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "PhonePad", UIInput.KeyboardType.PhonePad); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "NamePhonePad", UIInput.KeyboardType.NamePhonePad); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "EmailAddress", UIInput.KeyboardType.EmailAddress); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UIInput.KeyboardType), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUIInputKeyboardType(L, (UIInput.KeyboardType)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Default")) { translator.PushUIInputKeyboardType(L, UIInput.KeyboardType.Default); } else if (LuaAPI.xlua_is_eq_str(L, 1, "ASCIICapable")) { translator.PushUIInputKeyboardType(L, UIInput.KeyboardType.ASCIICapable); } else if (LuaAPI.xlua_is_eq_str(L, 1, "NumbersAndPunctuation")) { translator.PushUIInputKeyboardType(L, UIInput.KeyboardType.NumbersAndPunctuation); } else if (LuaAPI.xlua_is_eq_str(L, 1, "URL")) { translator.PushUIInputKeyboardType(L, UIInput.KeyboardType.URL); } else if (LuaAPI.xlua_is_eq_str(L, 1, "NumberPad")) { translator.PushUIInputKeyboardType(L, UIInput.KeyboardType.NumberPad); } else if (LuaAPI.xlua_is_eq_str(L, 1, "PhonePad")) { translator.PushUIInputKeyboardType(L, UIInput.KeyboardType.PhonePad); } else if (LuaAPI.xlua_is_eq_str(L, 1, "NamePhonePad")) { translator.PushUIInputKeyboardType(L, UIInput.KeyboardType.NamePhonePad); } else if (LuaAPI.xlua_is_eq_str(L, 1, "EmailAddress")) { translator.PushUIInputKeyboardType(L, UIInput.KeyboardType.EmailAddress); } else { return LuaAPI.luaL_error(L, "invalid string for UIInput.KeyboardType!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UIInput.KeyboardType! Expect number or string, got + " + lua_type); } return 1; } } public class UIInputValidationWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UIInput.Validation), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UIInput.Validation), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UIInput.Validation), L, null, 8, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "None", UIInput.Validation.None); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Integer", UIInput.Validation.Integer); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Float", UIInput.Validation.Float); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Alphanumeric", UIInput.Validation.Alphanumeric); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Username", UIInput.Validation.Username); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Name", UIInput.Validation.Name); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Filename", UIInput.Validation.Filename); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UIInput.Validation), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUIInputValidation(L, (UIInput.Validation)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "None")) { translator.PushUIInputValidation(L, UIInput.Validation.None); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Integer")) { translator.PushUIInputValidation(L, UIInput.Validation.Integer); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Float")) { translator.PushUIInputValidation(L, UIInput.Validation.Float); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Alphanumeric")) { translator.PushUIInputValidation(L, UIInput.Validation.Alphanumeric); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Username")) { translator.PushUIInputValidation(L, UIInput.Validation.Username); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Name")) { translator.PushUIInputValidation(L, UIInput.Validation.Name); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Filename")) { translator.PushUIInputValidation(L, UIInput.Validation.Filename); } else { return LuaAPI.luaL_error(L, "invalid string for UIInput.Validation!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UIInput.Validation! Expect number or string, got + " + lua_type); } return 1; } } public class UIInputInputTypeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UIInput.InputType), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UIInput.InputType), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UIInput.InputType), L, null, 4, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Standard", UIInput.InputType.Standard); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "AutoCorrect", UIInput.InputType.AutoCorrect); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Password", UIInput.InputType.Password); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UIInput.InputType), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUIInputInputType(L, (UIInput.InputType)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Standard")) { translator.PushUIInputInputType(L, UIInput.InputType.Standard); } else if (LuaAPI.xlua_is_eq_str(L, 1, "AutoCorrect")) { translator.PushUIInputInputType(L, UIInput.InputType.AutoCorrect); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Password")) { translator.PushUIInputInputType(L, UIInput.InputType.Password); } else { return LuaAPI.luaL_error(L, "invalid string for UIInput.InputType!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UIInput.InputType! Expect number or string, got + " + lua_type); } return 1; } } public class UIPanelRenderQueueWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UIPanel.RenderQueue), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UIPanel.RenderQueue), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UIPanel.RenderQueue), L, null, 4, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Automatic", UIPanel.RenderQueue.Automatic); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "StartAt", UIPanel.RenderQueue.StartAt); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Explicit", UIPanel.RenderQueue.Explicit); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UIPanel.RenderQueue), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUIPanelRenderQueue(L, (UIPanel.RenderQueue)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Automatic")) { translator.PushUIPanelRenderQueue(L, UIPanel.RenderQueue.Automatic); } else if (LuaAPI.xlua_is_eq_str(L, 1, "StartAt")) { translator.PushUIPanelRenderQueue(L, UIPanel.RenderQueue.StartAt); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Explicit")) { translator.PushUIPanelRenderQueue(L, UIPanel.RenderQueue.Explicit); } else { return LuaAPI.luaL_error(L, "invalid string for UIPanel.RenderQueue!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UIPanel.RenderQueue! Expect number or string, got + " + lua_type); } return 1; } } public class UIButtonColorStateWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UIButtonColor.State), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UIButtonColor.State), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UIButtonColor.State), L, null, 5, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Normal", UIButtonColor.State.Normal); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Hover", UIButtonColor.State.Hover); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Pressed", UIButtonColor.State.Pressed); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Disabled", UIButtonColor.State.Disabled); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UIButtonColor.State), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUIButtonColorState(L, (UIButtonColor.State)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Normal")) { translator.PushUIButtonColorState(L, UIButtonColor.State.Normal); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Hover")) { translator.PushUIButtonColorState(L, UIButtonColor.State.Hover); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Pressed")) { translator.PushUIButtonColorState(L, UIButtonColor.State.Pressed); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Disabled")) { translator.PushUIButtonColorState(L, UIButtonColor.State.Disabled); } else { return LuaAPI.luaL_error(L, "invalid string for UIButtonColor.State!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UIButtonColor.State! Expect number or string, got + " + lua_type); } return 1; } } public class UIBasicSpriteFlipWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UIBasicSprite.Flip), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UIBasicSprite.Flip), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UIBasicSprite.Flip), L, null, 5, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Nothing", UIBasicSprite.Flip.Nothing); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Horizontally", UIBasicSprite.Flip.Horizontally); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Vertically", UIBasicSprite.Flip.Vertically); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Both", UIBasicSprite.Flip.Both); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UIBasicSprite.Flip), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUIBasicSpriteFlip(L, (UIBasicSprite.Flip)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Nothing")) { translator.PushUIBasicSpriteFlip(L, UIBasicSprite.Flip.Nothing); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Horizontally")) { translator.PushUIBasicSpriteFlip(L, UIBasicSprite.Flip.Horizontally); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Vertically")) { translator.PushUIBasicSpriteFlip(L, UIBasicSprite.Flip.Vertically); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Both")) { translator.PushUIBasicSpriteFlip(L, UIBasicSprite.Flip.Both); } else { return LuaAPI.luaL_error(L, "invalid string for UIBasicSprite.Flip!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UIBasicSprite.Flip! Expect number or string, got + " + lua_type); } return 1; } } public class UIBasicSpriteAdvancedTypeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UIBasicSprite.AdvancedType), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UIBasicSprite.AdvancedType), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UIBasicSprite.AdvancedType), L, null, 4, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Invisible", UIBasicSprite.AdvancedType.Invisible); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Sliced", UIBasicSprite.AdvancedType.Sliced); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Tiled", UIBasicSprite.AdvancedType.Tiled); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UIBasicSprite.AdvancedType), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUIBasicSpriteAdvancedType(L, (UIBasicSprite.AdvancedType)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Invisible")) { translator.PushUIBasicSpriteAdvancedType(L, UIBasicSprite.AdvancedType.Invisible); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Sliced")) { translator.PushUIBasicSpriteAdvancedType(L, UIBasicSprite.AdvancedType.Sliced); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Tiled")) { translator.PushUIBasicSpriteAdvancedType(L, UIBasicSprite.AdvancedType.Tiled); } else { return LuaAPI.luaL_error(L, "invalid string for UIBasicSprite.AdvancedType!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UIBasicSprite.AdvancedType! Expect number or string, got + " + lua_type); } return 1; } } public class UIBasicSpriteFillDirectionWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UIBasicSprite.FillDirection), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UIBasicSprite.FillDirection), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UIBasicSprite.FillDirection), L, null, 6, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Horizontal", UIBasicSprite.FillDirection.Horizontal); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Vertical", UIBasicSprite.FillDirection.Vertical); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Radial90", UIBasicSprite.FillDirection.Radial90); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Radial180", UIBasicSprite.FillDirection.Radial180); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Radial360", UIBasicSprite.FillDirection.Radial360); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UIBasicSprite.FillDirection), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUIBasicSpriteFillDirection(L, (UIBasicSprite.FillDirection)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Horizontal")) { translator.PushUIBasicSpriteFillDirection(L, UIBasicSprite.FillDirection.Horizontal); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Vertical")) { translator.PushUIBasicSpriteFillDirection(L, UIBasicSprite.FillDirection.Vertical); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Radial90")) { translator.PushUIBasicSpriteFillDirection(L, UIBasicSprite.FillDirection.Radial90); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Radial180")) { translator.PushUIBasicSpriteFillDirection(L, UIBasicSprite.FillDirection.Radial180); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Radial360")) { translator.PushUIBasicSpriteFillDirection(L, UIBasicSprite.FillDirection.Radial360); } else { return LuaAPI.luaL_error(L, "invalid string for UIBasicSprite.FillDirection!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UIBasicSprite.FillDirection! Expect number or string, got + " + lua_type); } return 1; } } public class UIBasicSpriteTypeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UIBasicSprite.Type), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UIBasicSprite.Type), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UIBasicSprite.Type), L, null, 6, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Simple", UIBasicSprite.Type.Simple); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Sliced", UIBasicSprite.Type.Sliced); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Tiled", UIBasicSprite.Type.Tiled); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Filled", UIBasicSprite.Type.Filled); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Advanced", UIBasicSprite.Type.Advanced); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UIBasicSprite.Type), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUIBasicSpriteType(L, (UIBasicSprite.Type)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Simple")) { translator.PushUIBasicSpriteType(L, UIBasicSprite.Type.Simple); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Sliced")) { translator.PushUIBasicSpriteType(L, UIBasicSprite.Type.Sliced); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Tiled")) { translator.PushUIBasicSpriteType(L, UIBasicSprite.Type.Tiled); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Filled")) { translator.PushUIBasicSpriteType(L, UIBasicSprite.Type.Filled); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Advanced")) { translator.PushUIBasicSpriteType(L, UIBasicSprite.Type.Advanced); } else { return LuaAPI.luaL_error(L, "invalid string for UIBasicSprite.Type!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UIBasicSprite.Type! Expect number or string, got + " + lua_type); } return 1; } } public class UIRectAnchorUpdateWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UIRect.AnchorUpdate), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UIRect.AnchorUpdate), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UIRect.AnchorUpdate), L, null, 4, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "OnEnable", UIRect.AnchorUpdate.OnEnable); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "OnUpdate", UIRect.AnchorUpdate.OnUpdate); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "OnStart", UIRect.AnchorUpdate.OnStart); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UIRect.AnchorUpdate), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUIRectAnchorUpdate(L, (UIRect.AnchorUpdate)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "OnEnable")) { translator.PushUIRectAnchorUpdate(L, UIRect.AnchorUpdate.OnEnable); } else if (LuaAPI.xlua_is_eq_str(L, 1, "OnUpdate")) { translator.PushUIRectAnchorUpdate(L, UIRect.AnchorUpdate.OnUpdate); } else if (LuaAPI.xlua_is_eq_str(L, 1, "OnStart")) { translator.PushUIRectAnchorUpdate(L, UIRect.AnchorUpdate.OnStart); } else { return LuaAPI.luaL_error(L, "invalid string for UIRect.AnchorUpdate!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UIRect.AnchorUpdate! Expect number or string, got + " + lua_type); } return 1; } } public class UITableSortingWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UITable.Sorting), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UITable.Sorting), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UITable.Sorting), L, null, 6, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "None", UITable.Sorting.None); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Alphabetic", UITable.Sorting.Alphabetic); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Horizontal", UITable.Sorting.Horizontal); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Vertical", UITable.Sorting.Vertical); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Custom", UITable.Sorting.Custom); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UITable.Sorting), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUITableSorting(L, (UITable.Sorting)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "None")) { translator.PushUITableSorting(L, UITable.Sorting.None); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Alphabetic")) { translator.PushUITableSorting(L, UITable.Sorting.Alphabetic); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Horizontal")) { translator.PushUITableSorting(L, UITable.Sorting.Horizontal); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Vertical")) { translator.PushUITableSorting(L, UITable.Sorting.Vertical); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Custom")) { translator.PushUITableSorting(L, UITable.Sorting.Custom); } else { return LuaAPI.luaL_error(L, "invalid string for UITable.Sorting!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UITable.Sorting! Expect number or string, got + " + lua_type); } return 1; } } public class UITableDirectionWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UITable.Direction), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UITable.Direction), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UITable.Direction), L, null, 3, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Down", UITable.Direction.Down); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Up", UITable.Direction.Up); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UITable.Direction), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUITableDirection(L, (UITable.Direction)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Down")) { translator.PushUITableDirection(L, UITable.Direction.Down); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Up")) { translator.PushUITableDirection(L, UITable.Direction.Up); } else { return LuaAPI.luaL_error(L, "invalid string for UITable.Direction!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UITable.Direction! Expect number or string, got + " + lua_type); } return 1; } } public class UIGridSortingWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UIGrid.Sorting), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UIGrid.Sorting), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UIGrid.Sorting), L, null, 6, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "None", UIGrid.Sorting.None); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Alphabetic", UIGrid.Sorting.Alphabetic); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Horizontal", UIGrid.Sorting.Horizontal); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Vertical", UIGrid.Sorting.Vertical); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Custom", UIGrid.Sorting.Custom); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UIGrid.Sorting), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUIGridSorting(L, (UIGrid.Sorting)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "None")) { translator.PushUIGridSorting(L, UIGrid.Sorting.None); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Alphabetic")) { translator.PushUIGridSorting(L, UIGrid.Sorting.Alphabetic); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Horizontal")) { translator.PushUIGridSorting(L, UIGrid.Sorting.Horizontal); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Vertical")) { translator.PushUIGridSorting(L, UIGrid.Sorting.Vertical); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Custom")) { translator.PushUIGridSorting(L, UIGrid.Sorting.Custom); } else { return LuaAPI.luaL_error(L, "invalid string for UIGrid.Sorting!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UIGrid.Sorting! Expect number or string, got + " + lua_type); } return 1; } } public class UIGridArrangementWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UIGrid.Arrangement), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UIGrid.Arrangement), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UIGrid.Arrangement), L, null, 4, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Horizontal", UIGrid.Arrangement.Horizontal); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Vertical", UIGrid.Arrangement.Vertical); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "CellSnap", UIGrid.Arrangement.CellSnap); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UIGrid.Arrangement), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUIGridArrangement(L, (UIGrid.Arrangement)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Horizontal")) { translator.PushUIGridArrangement(L, UIGrid.Arrangement.Horizontal); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Vertical")) { translator.PushUIGridArrangement(L, UIGrid.Arrangement.Vertical); } else if (LuaAPI.xlua_is_eq_str(L, 1, "CellSnap")) { translator.PushUIGridArrangement(L, UIGrid.Arrangement.CellSnap); } else { return LuaAPI.luaL_error(L, "invalid string for UIGrid.Arrangement!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UIGrid.Arrangement! Expect number or string, got + " + lua_type); } return 1; } } public class UIScrollViewShowConditionWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UIScrollView.ShowCondition), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UIScrollView.ShowCondition), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UIScrollView.ShowCondition), L, null, 4, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Always", UIScrollView.ShowCondition.Always); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "OnlyIfNeeded", UIScrollView.ShowCondition.OnlyIfNeeded); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "WhenDragging", UIScrollView.ShowCondition.WhenDragging); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UIScrollView.ShowCondition), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUIScrollViewShowCondition(L, (UIScrollView.ShowCondition)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Always")) { translator.PushUIScrollViewShowCondition(L, UIScrollView.ShowCondition.Always); } else if (LuaAPI.xlua_is_eq_str(L, 1, "OnlyIfNeeded")) { translator.PushUIScrollViewShowCondition(L, UIScrollView.ShowCondition.OnlyIfNeeded); } else if (LuaAPI.xlua_is_eq_str(L, 1, "WhenDragging")) { translator.PushUIScrollViewShowCondition(L, UIScrollView.ShowCondition.WhenDragging); } else { return LuaAPI.luaL_error(L, "invalid string for UIScrollView.ShowCondition!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UIScrollView.ShowCondition! Expect number or string, got + " + lua_type); } return 1; } } public class UIScrollViewDragEffectWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UIScrollView.DragEffect), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UIScrollView.DragEffect), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UIScrollView.DragEffect), L, null, 4, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "None", UIScrollView.DragEffect.None); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Momentum", UIScrollView.DragEffect.Momentum); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "MomentumAndSpring", UIScrollView.DragEffect.MomentumAndSpring); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UIScrollView.DragEffect), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUIScrollViewDragEffect(L, (UIScrollView.DragEffect)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "None")) { translator.PushUIScrollViewDragEffect(L, UIScrollView.DragEffect.None); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Momentum")) { translator.PushUIScrollViewDragEffect(L, UIScrollView.DragEffect.Momentum); } else if (LuaAPI.xlua_is_eq_str(L, 1, "MomentumAndSpring")) { translator.PushUIScrollViewDragEffect(L, UIScrollView.DragEffect.MomentumAndSpring); } else { return LuaAPI.luaL_error(L, "invalid string for UIScrollView.DragEffect!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UIScrollView.DragEffect! Expect number or string, got + " + lua_type); } return 1; } } public class UIScrollViewMovementWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UIScrollView.Movement), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UIScrollView.Movement), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UIScrollView.Movement), L, null, 5, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Horizontal", UIScrollView.Movement.Horizontal); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Vertical", UIScrollView.Movement.Vertical); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Unrestricted", UIScrollView.Movement.Unrestricted); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Custom", UIScrollView.Movement.Custom); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UIScrollView.Movement), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUIScrollViewMovement(L, (UIScrollView.Movement)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Horizontal")) { translator.PushUIScrollViewMovement(L, UIScrollView.Movement.Horizontal); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Vertical")) { translator.PushUIScrollViewMovement(L, UIScrollView.Movement.Vertical); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Unrestricted")) { translator.PushUIScrollViewMovement(L, UIScrollView.Movement.Unrestricted); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Custom")) { translator.PushUIScrollViewMovement(L, UIScrollView.Movement.Custom); } else { return LuaAPI.luaL_error(L, "invalid string for UIScrollView.Movement!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UIScrollView.Movement! Expect number or string, got + " + lua_type); } return 1; } } public class UICameraEventTypeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UICamera.EventType), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UICamera.EventType), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UICamera.EventType), L, null, 5, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "World_3D", UICamera.EventType.World_3D); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "UI_3D", UICamera.EventType.UI_3D); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "World_2D", UICamera.EventType.World_2D); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "UI_2D", UICamera.EventType.UI_2D); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UICamera.EventType), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUICameraEventType(L, (UICamera.EventType)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "World_3D")) { translator.PushUICameraEventType(L, UICamera.EventType.World_3D); } else if (LuaAPI.xlua_is_eq_str(L, 1, "UI_3D")) { translator.PushUICameraEventType(L, UICamera.EventType.UI_3D); } else if (LuaAPI.xlua_is_eq_str(L, 1, "World_2D")) { translator.PushUICameraEventType(L, UICamera.EventType.World_2D); } else if (LuaAPI.xlua_is_eq_str(L, 1, "UI_2D")) { translator.PushUICameraEventType(L, UICamera.EventType.UI_2D); } else { return LuaAPI.luaL_error(L, "invalid string for UICamera.EventType!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UICamera.EventType! Expect number or string, got + " + lua_type); } return 1; } } public class UICameraClickNotificationWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UICamera.ClickNotification), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UICamera.ClickNotification), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UICamera.ClickNotification), L, null, 4, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "None", UICamera.ClickNotification.None); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Always", UICamera.ClickNotification.Always); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BasedOnDelta", UICamera.ClickNotification.BasedOnDelta); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UICamera.ClickNotification), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUICameraClickNotification(L, (UICamera.ClickNotification)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "None")) { translator.PushUICameraClickNotification(L, UICamera.ClickNotification.None); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Always")) { translator.PushUICameraClickNotification(L, UICamera.ClickNotification.Always); } else if (LuaAPI.xlua_is_eq_str(L, 1, "BasedOnDelta")) { translator.PushUICameraClickNotification(L, UICamera.ClickNotification.BasedOnDelta); } else { return LuaAPI.luaL_error(L, "invalid string for UICamera.ClickNotification!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UICamera.ClickNotification! Expect number or string, got + " + lua_type); } return 1; } } public class UICameraControlSchemeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UICamera.ControlScheme), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UICamera.ControlScheme), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UICamera.ControlScheme), L, null, 4, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Mouse", UICamera.ControlScheme.Mouse); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Touch", UICamera.ControlScheme.Touch); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Controller", UICamera.ControlScheme.Controller); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UICamera.ControlScheme), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUICameraControlScheme(L, (UICamera.ControlScheme)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Mouse")) { translator.PushUICameraControlScheme(L, UICamera.ControlScheme.Mouse); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Touch")) { translator.PushUICameraControlScheme(L, UICamera.ControlScheme.Touch); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Controller")) { translator.PushUICameraControlScheme(L, UICamera.ControlScheme.Controller); } else { return LuaAPI.luaL_error(L, "invalid string for UICamera.ControlScheme!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UICamera.ControlScheme! Expect number or string, got + " + lua_type); } return 1; } } public class UIProgressBarFillDirectionWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(UIProgressBar.FillDirection), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(UIProgressBar.FillDirection), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(UIProgressBar.FillDirection), L, null, 5, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "LeftToRight", UIProgressBar.FillDirection.LeftToRight); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "RightToLeft", UIProgressBar.FillDirection.RightToLeft); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BottomToTop", UIProgressBar.FillDirection.BottomToTop); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "TopToBottom", UIProgressBar.FillDirection.TopToBottom); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(UIProgressBar.FillDirection), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushUIProgressBarFillDirection(L, (UIProgressBar.FillDirection)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "LeftToRight")) { translator.PushUIProgressBarFillDirection(L, UIProgressBar.FillDirection.LeftToRight); } else if (LuaAPI.xlua_is_eq_str(L, 1, "RightToLeft")) { translator.PushUIProgressBarFillDirection(L, UIProgressBar.FillDirection.RightToLeft); } else if (LuaAPI.xlua_is_eq_str(L, 1, "BottomToTop")) { translator.PushUIProgressBarFillDirection(L, UIProgressBar.FillDirection.BottomToTop); } else if (LuaAPI.xlua_is_eq_str(L, 1, "TopToBottom")) { translator.PushUIProgressBarFillDirection(L, UIProgressBar.FillDirection.TopToBottom); } else { return LuaAPI.luaL_error(L, "invalid string for UIProgressBar.FillDirection!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for UIProgressBar.FillDirection! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCoreAssetSlotWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Core.Asset.Slot), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Core.Asset.Slot), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Core.Asset.Slot), L, null, 32, 0, 0); Utils.RegisterEnumType(L, typeof(Thousandto.Core.Asset.Slot)); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Core.Asset.Slot), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCoreAssetSlot(L, (Thousandto.Core.Asset.Slot)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { try { translator.TranslateToEnumToTop(L, typeof(Thousandto.Core.Asset.Slot), 1); } catch (System.Exception e) { return LuaAPI.luaL_error(L, "cast to " + typeof(Thousandto.Core.Asset.Slot) + " exception:" + e); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Core.Asset.Slot! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCoreAssetTimelinePlayStateWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Core.Asset.TimelinePlayState), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Core.Asset.TimelinePlayState), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Core.Asset.TimelinePlayState), L, null, 5, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "None", Thousandto.Core.Asset.TimelinePlayState.None); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Playing", Thousandto.Core.Asset.TimelinePlayState.Playing); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Paused", Thousandto.Core.Asset.TimelinePlayState.Paused); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Ended", Thousandto.Core.Asset.TimelinePlayState.Ended); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Core.Asset.TimelinePlayState), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCoreAssetTimelinePlayState(L, (Thousandto.Core.Asset.TimelinePlayState)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "None")) { translator.PushThousandtoCoreAssetTimelinePlayState(L, Thousandto.Core.Asset.TimelinePlayState.None); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Playing")) { translator.PushThousandtoCoreAssetTimelinePlayState(L, Thousandto.Core.Asset.TimelinePlayState.Playing); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Paused")) { translator.PushThousandtoCoreAssetTimelinePlayState(L, Thousandto.Core.Asset.TimelinePlayState.Paused); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Ended")) { translator.PushThousandtoCoreAssetTimelinePlayState(L, Thousandto.Core.Asset.TimelinePlayState.Ended); } else { return LuaAPI.luaL_error(L, "invalid string for Thousandto.Core.Asset.TimelinePlayState!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Core.Asset.TimelinePlayState! Expect number or string, got + " + lua_type); } return 1; } } public class ThousandtoCoreBaseSpawnPoolNameCodeWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Thousandto.Core.Base.SpawnPoolNameCode), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Thousandto.Core.Base.SpawnPoolNameCode), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Thousandto.Core.Base.SpawnPoolNameCode), L, null, 9, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Begin", Thousandto.Core.Base.SpawnPoolNameCode.Begin); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "VFX", Thousandto.Core.Base.SpawnPoolNameCode.VFX); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Role", Thousandto.Core.Base.SpawnPoolNameCode.Role); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Scene", Thousandto.Core.Base.SpawnPoolNameCode.Scene); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "UI", Thousandto.Core.Base.SpawnPoolNameCode.UI); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ATLAS", Thousandto.Core.Base.SpawnPoolNameCode.ATLAS); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "FONTS", Thousandto.Core.Base.SpawnPoolNameCode.FONTS); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "End", Thousandto.Core.Base.SpawnPoolNameCode.End); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Thousandto.Core.Base.SpawnPoolNameCode), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushThousandtoCoreBaseSpawnPoolNameCode(L, (Thousandto.Core.Base.SpawnPoolNameCode)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Begin")) { translator.PushThousandtoCoreBaseSpawnPoolNameCode(L, Thousandto.Core.Base.SpawnPoolNameCode.Begin); } else if (LuaAPI.xlua_is_eq_str(L, 1, "VFX")) { translator.PushThousandtoCoreBaseSpawnPoolNameCode(L, Thousandto.Core.Base.SpawnPoolNameCode.VFX); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Role")) { translator.PushThousandtoCoreBaseSpawnPoolNameCode(L, Thousandto.Core.Base.SpawnPoolNameCode.Role); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Scene")) { translator.PushThousandtoCoreBaseSpawnPoolNameCode(L, Thousandto.Core.Base.SpawnPoolNameCode.Scene); } else if (LuaAPI.xlua_is_eq_str(L, 1, "UI")) { translator.PushThousandtoCoreBaseSpawnPoolNameCode(L, Thousandto.Core.Base.SpawnPoolNameCode.UI); } else if (LuaAPI.xlua_is_eq_str(L, 1, "ATLAS")) { translator.PushThousandtoCoreBaseSpawnPoolNameCode(L, Thousandto.Core.Base.SpawnPoolNameCode.ATLAS); } else if (LuaAPI.xlua_is_eq_str(L, 1, "FONTS")) { translator.PushThousandtoCoreBaseSpawnPoolNameCode(L, Thousandto.Core.Base.SpawnPoolNameCode.FONTS); } else if (LuaAPI.xlua_is_eq_str(L, 1, "End")) { translator.PushThousandtoCoreBaseSpawnPoolNameCode(L, Thousandto.Core.Base.SpawnPoolNameCode.End); } else { return LuaAPI.luaL_error(L, "invalid string for Thousandto.Core.Base.SpawnPoolNameCode!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Thousandto.Core.Base.SpawnPoolNameCode! Expect number or string, got + " + lua_type); } return 1; } } public class BestHTTPHTTPMethodsWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(BestHTTP.HTTPMethods), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(BestHTTP.HTTPMethods), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(BestHTTP.HTTPMethods), L, null, 7, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Get", BestHTTP.HTTPMethods.Get); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Head", BestHTTP.HTTPMethods.Head); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Post", BestHTTP.HTTPMethods.Post); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Put", BestHTTP.HTTPMethods.Put); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Delete", BestHTTP.HTTPMethods.Delete); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Patch", BestHTTP.HTTPMethods.Patch); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(BestHTTP.HTTPMethods), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushBestHTTPHTTPMethods(L, (BestHTTP.HTTPMethods)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "Get")) { translator.PushBestHTTPHTTPMethods(L, BestHTTP.HTTPMethods.Get); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Head")) { translator.PushBestHTTPHTTPMethods(L, BestHTTP.HTTPMethods.Head); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Post")) { translator.PushBestHTTPHTTPMethods(L, BestHTTP.HTTPMethods.Post); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Put")) { translator.PushBestHTTPHTTPMethods(L, BestHTTP.HTTPMethods.Put); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Delete")) { translator.PushBestHTTPHTTPMethods(L, BestHTTP.HTTPMethods.Delete); } else if (LuaAPI.xlua_is_eq_str(L, 1, "Patch")) { translator.PushBestHTTPHTTPMethods(L, BestHTTP.HTTPMethods.Patch); } else { return LuaAPI.luaL_error(L, "invalid string for BestHTTP.HTTPMethods!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for BestHTTP.HTTPMethods! Expect number or string, got + " + lua_type); } return 1; } } public class SystemReflectionBindingFlagsWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(System.Reflection.BindingFlags), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(System.Reflection.BindingFlags), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(System.Reflection.BindingFlags), L, null, 22, 0, 0); Utils.RegisterEnumType(L, typeof(System.Reflection.BindingFlags)); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(System.Reflection.BindingFlags), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushSystemReflectionBindingFlags(L, (System.Reflection.BindingFlags)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { try { translator.TranslateToEnumToTop(L, typeof(System.Reflection.BindingFlags), 1); } catch (System.Exception e) { return LuaAPI.luaL_error(L, "cast to " + typeof(System.Reflection.BindingFlags) + " exception:" + e); } } else { return LuaAPI.luaL_error(L, "invalid lua type for System.Reflection.BindingFlags! Expect number or string, got + " + lua_type); } return 1; } } public class TutorialTestEnumWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Tutorial.TestEnum), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Tutorial.TestEnum), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Tutorial.TestEnum), L, null, 3, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "E1", Tutorial.TestEnum.E1); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "E2", Tutorial.TestEnum.E2); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Tutorial.TestEnum), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushTutorialTestEnum(L, (Tutorial.TestEnum)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "E1")) { translator.PushTutorialTestEnum(L, Tutorial.TestEnum.E1); } else if (LuaAPI.xlua_is_eq_str(L, 1, "E2")) { translator.PushTutorialTestEnum(L, Tutorial.TestEnum.E2); } else { return LuaAPI.luaL_error(L, "invalid string for Tutorial.TestEnum!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Tutorial.TestEnum! Expect number or string, got + " + lua_type); } return 1; } } public class TutorialDerivedClassTestEnumInnerWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); Utils.BeginObjectRegister(typeof(Tutorial.DerivedClass.TestEnumInner), L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(typeof(Tutorial.DerivedClass.TestEnumInner), L, translator, null, null, null, null, null); Utils.BeginClassRegister(typeof(Tutorial.DerivedClass.TestEnumInner), L, null, 3, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "E3", Tutorial.DerivedClass.TestEnumInner.E3); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "E4", Tutorial.DerivedClass.TestEnumInner.E4); Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); Utils.EndClassRegister(typeof(Tutorial.DerivedClass.TestEnumInner), L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CastFrom(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); LuaTypes lua_type = LuaAPI.lua_type(L, 1); if (lua_type == LuaTypes.LUA_TNUMBER) { translator.PushTutorialDerivedClassTestEnumInner(L, (Tutorial.DerivedClass.TestEnumInner)LuaAPI.xlua_tointeger(L, 1)); } else if(lua_type == LuaTypes.LUA_TSTRING) { if (LuaAPI.xlua_is_eq_str(L, 1, "E3")) { translator.PushTutorialDerivedClassTestEnumInner(L, Tutorial.DerivedClass.TestEnumInner.E3); } else if (LuaAPI.xlua_is_eq_str(L, 1, "E4")) { translator.PushTutorialDerivedClassTestEnumInner(L, Tutorial.DerivedClass.TestEnumInner.E4); } else { return LuaAPI.luaL_error(L, "invalid string for Tutorial.DerivedClass.TestEnumInner!"); } } else { return LuaAPI.luaL_error(L, "invalid lua type for Tutorial.DerivedClass.TestEnumInner! Expect number or string, got + " + lua_type); } return 1; } } }