Initial commit: Client Doc docs Server Tools
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,791 @@
|
||||
#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 = XLuaBase.lua_CSFunction;
|
||||
#endif
|
||||
|
||||
using XLua;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
namespace XLua.CSObjectWrap
|
||||
{
|
||||
using Utils = XLua.Utils;
|
||||
public class XGameUtilityWrap
|
||||
{
|
||||
public static void __Register(RealStatePtr L)
|
||||
{
|
||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
||||
System.Type type = typeof(XGame.Utility);
|
||||
Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Utils.EndObjectRegister(type, L, translator, null, null,
|
||||
null, null, null);
|
||||
|
||||
Utils.BeginClassRegister(type, L, __CreateInstance, 27, 0, 0);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "GenClientNameId", _m_GenClientNameId_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetTypeByTypeName", _m_GetTypeByTypeName_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetPropValue", _m_GetPropValue_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetFieldValue", _m_GetFieldValue_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "CopyObject", _m_CopyObject_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "CopyFields", _m_CopyFields_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "ThrowError", _m_ThrowError_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetStringMd5", _m_GetStringMd5_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetFileMd5", _m_GetFileMd5_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetBytesMd5", _m_GetBytesMd5_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetTimeTick", _m_GetTimeTick_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "XWorldGetTime", _m_XWorldGetTime_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "IsPossibleSimulator", _m_IsPossibleSimulator_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "FormatBytesStr", _m_FormatBytesStr_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "Contains", _m_Contains_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "RandomRangeToInt", _m_RandomRangeToInt_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "CreateMulDirectory", _m_CreateMulDirectory_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "DestroyUnityObject", _m_DestroyUnityObject_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "DestroyUnityObjectImmediate", _m_DestroyUnityObjectImmediate_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "CreateGameObject", _m_CreateGameObject_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "NewGameObeject", _m_NewGameObeject_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "CreateChildGameObject", _m_CreateChildGameObject_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "DestroyChildren", _m_DestroyChildren_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "NormalizeTransform", _m_NormalizeTransform_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "FindSocketTransform", _m_FindSocketTransform_xlua_st_);
|
||||
Utils.RegisterFunc(L, Utils.CLS_IDX, "IsUnityObject", _m_IsUnityObject_xlua_st_);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Utils.EndClassRegister(type, L, translator);
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int __CreateInstance(RealStatePtr L)
|
||||
{
|
||||
return LuaAPI.luaL_error(L, "XGame.Utility does not have a constructor!");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_GenClientNameId_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
string _actorTypeName = LuaAPI.lua_tostring(L, 1);
|
||||
|
||||
var gen_ret = XGame.Utility.GenClientNameId( _actorTypeName );
|
||||
LuaAPI.xlua_pushinteger(L, gen_ret);
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_GetTypeByTypeName_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
string _typeName = LuaAPI.lua_tostring(L, 1);
|
||||
|
||||
var gen_ret = XGame.Utility.GetTypeByTypeName( _typeName );
|
||||
translator.Push(L, gen_ret);
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_GetPropValue_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
object _obj = translator.GetObject(L, 1, typeof(object));
|
||||
string _name = LuaAPI.lua_tostring(L, 2);
|
||||
|
||||
var gen_ret = XGame.Utility.GetPropValue( _obj, _name );
|
||||
translator.PushAny(L, gen_ret);
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_GetFieldValue_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
object _obj = translator.GetObject(L, 1, typeof(object));
|
||||
string _name = LuaAPI.lua_tostring(L, 2);
|
||||
|
||||
var gen_ret = XGame.Utility.GetFieldValue( _obj, _name );
|
||||
translator.PushAny(L, gen_ret);
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_CopyObject_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
||||
|
||||
|
||||
|
||||
int gen_param_count = LuaAPI.lua_gettop(L);
|
||||
|
||||
if(gen_param_count == 1&& translator.Assignable<object>(L, 1))
|
||||
{
|
||||
object _srcObject = translator.GetObject(L, 1, typeof(object));
|
||||
|
||||
var gen_ret = XGame.Utility.CopyObject( _srcObject );
|
||||
translator.PushAny(L, gen_ret);
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
if(gen_param_count == 2&& translator.Assignable<object>(L, 1)&& translator.Assignable<object>(L, 2))
|
||||
{
|
||||
object _srcObject = translator.GetObject(L, 1, typeof(object));
|
||||
object _targetObject = translator.GetObject(L, 2, typeof(object));
|
||||
|
||||
var gen_ret = XGame.Utility.CopyObject( _srcObject, _targetObject );
|
||||
LuaAPI.lua_pushboolean(L, gen_ret);
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
return LuaAPI.luaL_error(L, "invalid arguments to XGame.Utility.CopyObject!");
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_CopyFields_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
object _src = translator.GetObject(L, 1, typeof(object));
|
||||
|
||||
var gen_ret = XGame.Utility.CopyFields( _src );
|
||||
translator.PushAny(L, gen_ret);
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_ThrowError_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
string _fmt = LuaAPI.lua_tostring(L, 1);
|
||||
object[] _args = translator.GetParams<object>(L, 2);
|
||||
|
||||
XGame.Utility.ThrowError( _fmt, _args );
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_GetStringMd5_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
string _source = LuaAPI.lua_tostring(L, 1);
|
||||
|
||||
var gen_ret = XGame.Utility.GetStringMd5( _source );
|
||||
LuaAPI.lua_pushstring(L, gen_ret);
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_GetFileMd5_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
string _file = LuaAPI.lua_tostring(L, 1);
|
||||
|
||||
var gen_ret = XGame.Utility.GetFileMd5( _file );
|
||||
LuaAPI.lua_pushstring(L, gen_ret);
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_GetBytesMd5_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
byte[] _bytes = LuaAPI.lua_tobytes(L, 1);
|
||||
|
||||
var gen_ret = XGame.Utility.GetBytesMd5( _bytes );
|
||||
LuaAPI.lua_pushstring(L, gen_ret);
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_GetTimeTick_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
|
||||
var gen_ret = XGame.Utility.GetTimeTick( );
|
||||
LuaAPI.lua_pushint64(L, gen_ret);
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_XWorldGetTime_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
|
||||
var gen_ret = XGame.Utility.XWorldGetTime( );
|
||||
LuaAPI.lua_pushnumber(L, gen_ret);
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_IsPossibleSimulator_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
|
||||
var gen_ret = XGame.Utility.IsPossibleSimulator( );
|
||||
LuaAPI.lua_pushboolean(L, gen_ret);
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_FormatBytesStr_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
long _bytes = LuaAPI.lua_toint64(L, 1);
|
||||
|
||||
var gen_ret = XGame.Utility.FormatBytesStr( _bytes );
|
||||
LuaAPI.lua_pushstring(L, gen_ret);
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_Contains_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
string[] _array = (string[])translator.GetObject(L, 1, typeof(string[]));
|
||||
string _value = LuaAPI.lua_tostring(L, 2);
|
||||
|
||||
var gen_ret = XGame.Utility.Contains( _array, _value );
|
||||
LuaAPI.lua_pushboolean(L, gen_ret);
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_RandomRangeToInt_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
int _min = LuaAPI.xlua_tointeger(L, 1);
|
||||
int _max = LuaAPI.xlua_tointeger(L, 2);
|
||||
|
||||
var gen_ret = XGame.Utility.RandomRangeToInt( _min, _max );
|
||||
LuaAPI.xlua_pushinteger(L, gen_ret);
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_CreateMulDirectory_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
string _path = LuaAPI.lua_tostring(L, 1);
|
||||
|
||||
XGame.Utility.CreateMulDirectory( _path );
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_DestroyUnityObject_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
UnityEngine.Object _unityObject = (UnityEngine.Object)translator.GetObject(L, 1, typeof(UnityEngine.Object));
|
||||
|
||||
XGame.Utility.DestroyUnityObject( _unityObject );
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_DestroyUnityObjectImmediate_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
UnityEngine.Object _unityObject = (UnityEngine.Object)translator.GetObject(L, 1, typeof(UnityEngine.Object));
|
||||
|
||||
XGame.Utility.DestroyUnityObjectImmediate( _unityObject );
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_CreateGameObject_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
UnityEngine.GameObject _parent = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
||||
string _name = LuaAPI.lua_tostring(L, 2);
|
||||
|
||||
var gen_ret = XGame.Utility.CreateGameObject( _parent, _name );
|
||||
translator.Push(L, gen_ret);
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_NewGameObeject_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
string _name = LuaAPI.lua_tostring(L, 1);
|
||||
|
||||
var gen_ret = XGame.Utility.NewGameObeject( _name );
|
||||
translator.Push(L, gen_ret);
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_CreateChildGameObject_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
UnityEngine.GameObject _parent = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
||||
string _name = LuaAPI.lua_tostring(L, 2);
|
||||
|
||||
var gen_ret = XGame.Utility.CreateChildGameObject( _parent, _name );
|
||||
translator.Push(L, gen_ret);
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_DestroyChildren_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
UnityEngine.Transform _transform = (UnityEngine.Transform)translator.GetObject(L, 1, typeof(UnityEngine.Transform));
|
||||
|
||||
var gen_ret = XGame.Utility.DestroyChildren( _transform );
|
||||
LuaAPI.lua_pushboolean(L, gen_ret);
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_NormalizeTransform_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
UnityEngine.Transform _transform = (UnityEngine.Transform)translator.GetObject(L, 1, typeof(UnityEngine.Transform));
|
||||
|
||||
XGame.Utility.NormalizeTransform( _transform );
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_FindSocketTransform_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
||||
string _socketName = LuaAPI.lua_tostring(L, 2);
|
||||
|
||||
var gen_ret = XGame.Utility.FindSocketTransform( _go, _socketName );
|
||||
translator.Push(L, gen_ret);
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _m_IsUnityObject_xlua_st_(RealStatePtr L)
|
||||
{
|
||||
try {
|
||||
|
||||
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
object _unityObject = translator.GetObject(L, 1, typeof(object));
|
||||
|
||||
var gen_ret = XGame.Utility.IsUnityObject( _unityObject );
|
||||
LuaAPI.lua_pushboolean(L, gen_ret);
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
} catch(System.Exception gen_e) {
|
||||
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user