1624 lines
60 KiB
C#
1624 lines
60 KiB
C#
|
#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 NGUIToolsWrap
|
|||
|
{
|
|||
|
public static void __Register(RealStatePtr L)
|
|||
|
{
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
System.Type type = typeof(NGUITools);
|
|||
|
Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
|||
|
null, null, null);
|
|||
|
|
|||
|
Utils.BeginClassRegister(type, L, __CreateInstance, 44, 5, 3);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "PlaySound", _m_PlaySound_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "RandomRange", _m_RandomRange_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetHierarchy", _m_GetHierarchy_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "FindCameraForLayer", _m_FindCameraForLayer_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "AddWidgetCollider", _m_AddWidgetCollider_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "UpdateWidgetCollider", _m_UpdateWidgetCollider_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetTypeName", _m_GetTypeName_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "RegisterUndo", _m_RegisterUndo_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "SetDirty", _m_SetDirty_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "AddChild", _m_AddChild_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "SetButtonGrayAndNotOnClick", _m_SetButtonGrayAndNotOnClick_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "AddChilds", _m_AddChilds_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "CalculateRaycastDepth", _m_CalculateRaycastDepth_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "CalculateNextDepth", _m_CalculateNextDepth_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "AdjustDepth", _m_AdjustDepth_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "BringForward", _m_BringForward_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "PushBack", _m_PushBack_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "NormalizeDepths", _m_NormalizeDepths_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "NormalizeWidgetDepths", _m_NormalizeWidgetDepths_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "NormalizePanelDepths", _m_NormalizePanelDepths_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "CreateUI", _m_CreateUI_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "SetChildLayer", _m_SetChildLayer_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "AddSprite", _m_AddSprite_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetRoot", _m_GetRoot_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "Destroy", _m_Destroy_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "DestroyImmediate", _m_DestroyImmediate_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "Broadcast", _m_Broadcast_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "IsChild", _m_IsChild_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "SetActive", _m_SetActive_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "SetActiveChildren", _m_SetActiveChildren_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetActive", _m_GetActive_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "SetActiveSelf", _m_SetActiveSelf_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "SetLayer", _m_SetLayer_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "Round", _m_Round_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "MakePixelPerfect", _m_MakePixelPerfect_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "Save", _m_Save_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "Load", _m_Load_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "ApplyPMA", _m_ApplyPMA_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "MarkParentAsChanged", _m_MarkParentAsChanged_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetFuncName", _m_GetFuncName_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "ImmediatelyCreateDrawCalls", _m_ImmediatelyCreateDrawCalls_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "KeyToCaption", _m_KeyToCaption_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetVertsColor", _m_GetVertsColor_xlua_st_);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "soundVolume", _g_get_soundVolume);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "fileAccess", _g_get_fileAccess);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "clipboard", _g_get_clipboard);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "screenSize", _g_get_screenSize);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "keys", _g_get_keys);
|
|||
|
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "soundVolume", _s_set_soundVolume);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "clipboard", _s_set_clipboard);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "keys", _s_set_keys);
|
|||
|
|
|||
|
|
|||
|
Utils.EndClassRegister(type, L, translator);
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int __CreateInstance(RealStatePtr L)
|
|||
|
{
|
|||
|
return LuaAPI.luaL_error(L, "NGUITools does not have a constructor!");
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_PlaySound_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|||
|
|
|||
|
if(gen_param_count == 1&& translator.Assignable<UnityEngine.AudioClip>(L, 1))
|
|||
|
{
|
|||
|
UnityEngine.AudioClip _clip = (UnityEngine.AudioClip)translator.GetObject(L, 1, typeof(UnityEngine.AudioClip));
|
|||
|
|
|||
|
UnityEngine.AudioSource gen_ret = NGUITools.PlaySound( _clip );
|
|||
|
translator.Push(L, gen_ret);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 1;
|
|||
|
}
|
|||
|
if(gen_param_count == 2&& translator.Assignable<UnityEngine.AudioClip>(L, 1)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
|
|||
|
{
|
|||
|
UnityEngine.AudioClip _clip = (UnityEngine.AudioClip)translator.GetObject(L, 1, typeof(UnityEngine.AudioClip));
|
|||
|
float _volume = (float)LuaAPI.lua_tonumber(L, 2);
|
|||
|
|
|||
|
UnityEngine.AudioSource gen_ret = NGUITools.PlaySound( _clip, _volume );
|
|||
|
translator.Push(L, gen_ret);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 1;
|
|||
|
}
|
|||
|
if(gen_param_count == 3&& translator.Assignable<UnityEngine.AudioClip>(L, 1)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
|
|||
|
{
|
|||
|
UnityEngine.AudioClip _clip = (UnityEngine.AudioClip)translator.GetObject(L, 1, typeof(UnityEngine.AudioClip));
|
|||
|
float _volume = (float)LuaAPI.lua_tonumber(L, 2);
|
|||
|
float _pitch = (float)LuaAPI.lua_tonumber(L, 3);
|
|||
|
|
|||
|
UnityEngine.AudioSource gen_ret = NGUITools.PlaySound( _clip, _volume, _pitch );
|
|||
|
translator.Push(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 NGUITools.PlaySound!");
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_RandomRange_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
int _min = LuaAPI.xlua_tointeger(L, 1);
|
|||
|
int _max = LuaAPI.xlua_tointeger(L, 2);
|
|||
|
|
|||
|
int gen_ret = NGUITools.RandomRange( _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_GetHierarchy_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.GameObject _obj = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
|
|||
|
string gen_ret = NGUITools.GetHierarchy( _obj );
|
|||
|
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_FindCameraForLayer_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|||
|
|
|||
|
if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& translator.Assignable<UIRoot>(L, 2))
|
|||
|
{
|
|||
|
int _layer = LuaAPI.xlua_tointeger(L, 1);
|
|||
|
UIRoot _root = (UIRoot)translator.GetObject(L, 2, typeof(UIRoot));
|
|||
|
|
|||
|
UnityEngine.Camera gen_ret = NGUITools.FindCameraForLayer( _layer, _root );
|
|||
|
translator.Push(L, gen_ret);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 1;
|
|||
|
}
|
|||
|
if(gen_param_count == 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1))
|
|||
|
{
|
|||
|
int _layer = LuaAPI.xlua_tointeger(L, 1);
|
|||
|
|
|||
|
UnityEngine.Camera gen_ret = NGUITools.FindCameraForLayer( _layer );
|
|||
|
translator.Push(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 NGUITools.FindCameraForLayer!");
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_AddWidgetCollider_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|||
|
|
|||
|
if(gen_param_count == 1&& translator.Assignable<UnityEngine.GameObject>(L, 1))
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
|
|||
|
NGUITools.AddWidgetCollider( _go );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
if(gen_param_count == 2&& translator.Assignable<UnityEngine.GameObject>(L, 1)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2))
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
bool _considerInactive = LuaAPI.lua_toboolean(L, 2);
|
|||
|
|
|||
|
NGUITools.AddWidgetCollider( _go, _considerInactive );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
return LuaAPI.luaL_error(L, "invalid arguments to NGUITools.AddWidgetCollider!");
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_UpdateWidgetCollider_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|||
|
|
|||
|
if(gen_param_count == 1&& translator.Assignable<UnityEngine.GameObject>(L, 1))
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
|
|||
|
NGUITools.UpdateWidgetCollider( _go );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
if(gen_param_count == 2&& translator.Assignable<UnityEngine.GameObject>(L, 1)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2))
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
bool _considerInactive = LuaAPI.lua_toboolean(L, 2);
|
|||
|
|
|||
|
NGUITools.UpdateWidgetCollider( _go, _considerInactive );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
if(gen_param_count == 2&& translator.Assignable<UnityEngine.BoxCollider>(L, 1)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2))
|
|||
|
{
|
|||
|
UnityEngine.BoxCollider _box = (UnityEngine.BoxCollider)translator.GetObject(L, 1, typeof(UnityEngine.BoxCollider));
|
|||
|
bool _considerInactive = LuaAPI.lua_toboolean(L, 2);
|
|||
|
|
|||
|
NGUITools.UpdateWidgetCollider( _box, _considerInactive );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
if(gen_param_count == 2&& translator.Assignable<UnityEngine.BoxCollider2D>(L, 1)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2))
|
|||
|
{
|
|||
|
UnityEngine.BoxCollider2D _box = (UnityEngine.BoxCollider2D)translator.GetObject(L, 1, typeof(UnityEngine.BoxCollider2D));
|
|||
|
bool _considerInactive = LuaAPI.lua_toboolean(L, 2);
|
|||
|
|
|||
|
NGUITools.UpdateWidgetCollider( _box, _considerInactive );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
return LuaAPI.luaL_error(L, "invalid arguments to NGUITools.UpdateWidgetCollider!");
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_GetTypeName_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.Object _obj = (UnityEngine.Object)translator.GetObject(L, 1, typeof(UnityEngine.Object));
|
|||
|
|
|||
|
string gen_ret = NGUITools.GetTypeName( _obj );
|
|||
|
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_RegisterUndo_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.Object _obj = (UnityEngine.Object)translator.GetObject(L, 1, typeof(UnityEngine.Object));
|
|||
|
string _name = LuaAPI.lua_tostring(L, 2);
|
|||
|
|
|||
|
NGUITools.RegisterUndo( _obj, _name );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_SetDirty_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.Object _obj = (UnityEngine.Object)translator.GetObject(L, 1, typeof(UnityEngine.Object));
|
|||
|
|
|||
|
NGUITools.SetDirty( _obj );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_AddChild_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|||
|
|
|||
|
if(gen_param_count == 1&& translator.Assignable<UnityEngine.GameObject>(L, 1))
|
|||
|
{
|
|||
|
UnityEngine.GameObject _parent = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
|
|||
|
UnityEngine.GameObject gen_ret = NGUITools.AddChild( _parent );
|
|||
|
translator.Push(L, gen_ret);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 1;
|
|||
|
}
|
|||
|
if(gen_param_count == 2&& translator.Assignable<UnityEngine.GameObject>(L, 1)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2))
|
|||
|
{
|
|||
|
UnityEngine.GameObject _parent = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
bool _undo = LuaAPI.lua_toboolean(L, 2);
|
|||
|
|
|||
|
UnityEngine.GameObject gen_ret = NGUITools.AddChild( _parent, _undo );
|
|||
|
translator.Push(L, gen_ret);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 1;
|
|||
|
}
|
|||
|
if(gen_param_count == 2&& translator.Assignable<UnityEngine.GameObject>(L, 1)&& translator.Assignable<UnityEngine.GameObject>(L, 2))
|
|||
|
{
|
|||
|
UnityEngine.GameObject _parent = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
UnityEngine.GameObject _prefab = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
|
|||
|
|
|||
|
UnityEngine.GameObject gen_ret = NGUITools.AddChild( _parent, _prefab );
|
|||
|
translator.Push(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 NGUITools.AddChild!");
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_SetButtonGrayAndNotOnClick_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.Transform _trs = (UnityEngine.Transform)translator.GetObject(L, 1, typeof(UnityEngine.Transform));
|
|||
|
bool _isgray = LuaAPI.lua_toboolean(L, 2);
|
|||
|
|
|||
|
NGUITools.SetButtonGrayAndNotOnClick( _trs, _isgray );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_AddChilds_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.GameObject _parent = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
UnityEngine.GameObject _prefab = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
|
|||
|
int _count = LuaAPI.xlua_tointeger(L, 3);
|
|||
|
|
|||
|
System.Collections.Generic.List<UnityEngine.GameObject> gen_ret = NGUITools.AddChilds( _parent, _prefab, _count );
|
|||
|
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_CalculateRaycastDepth_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
|
|||
|
int gen_ret = NGUITools.CalculateRaycastDepth( _go );
|
|||
|
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_CalculateNextDepth_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|||
|
|
|||
|
if(gen_param_count == 1&& translator.Assignable<UnityEngine.GameObject>(L, 1))
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
|
|||
|
int gen_ret = NGUITools.CalculateNextDepth( _go );
|
|||
|
LuaAPI.xlua_pushinteger(L, gen_ret);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 1;
|
|||
|
}
|
|||
|
if(gen_param_count == 2&& translator.Assignable<UnityEngine.GameObject>(L, 1)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2))
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
bool _ignoreChildrenWithColliders = LuaAPI.lua_toboolean(L, 2);
|
|||
|
|
|||
|
int gen_ret = NGUITools.CalculateNextDepth( _go, _ignoreChildrenWithColliders );
|
|||
|
LuaAPI.xlua_pushinteger(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 NGUITools.CalculateNextDepth!");
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_AdjustDepth_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
int _adjustment = LuaAPI.xlua_tointeger(L, 2);
|
|||
|
|
|||
|
int gen_ret = NGUITools.AdjustDepth( _go, _adjustment );
|
|||
|
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_BringForward_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
|
|||
|
NGUITools.BringForward( _go );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_PushBack_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
|
|||
|
NGUITools.PushBack( _go );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_NormalizeDepths_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
|
|||
|
NGUITools.NormalizeDepths( );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_NormalizeWidgetDepths_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|||
|
|
|||
|
if(gen_param_count == 0)
|
|||
|
{
|
|||
|
|
|||
|
NGUITools.NormalizeWidgetDepths( );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
if(gen_param_count == 1&& translator.Assignable<UnityEngine.GameObject>(L, 1))
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
|
|||
|
NGUITools.NormalizeWidgetDepths( _go );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
if(gen_param_count == 1&& translator.Assignable<UIWidget[]>(L, 1))
|
|||
|
{
|
|||
|
UIWidget[] _list = (UIWidget[])translator.GetObject(L, 1, typeof(UIWidget[]));
|
|||
|
|
|||
|
NGUITools.NormalizeWidgetDepths( _list );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
return LuaAPI.luaL_error(L, "invalid arguments to NGUITools.NormalizeWidgetDepths!");
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_NormalizePanelDepths_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
|
|||
|
NGUITools.NormalizePanelDepths( );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_CreateUI_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|||
|
|
|||
|
if(gen_param_count == 1&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 1))
|
|||
|
{
|
|||
|
bool _advanced3D = LuaAPI.lua_toboolean(L, 1);
|
|||
|
|
|||
|
UIPanel gen_ret = NGUITools.CreateUI( _advanced3D );
|
|||
|
translator.Push(L, gen_ret);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 1;
|
|||
|
}
|
|||
|
if(gen_param_count == 2&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 1)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
|
|||
|
{
|
|||
|
bool _advanced3D = LuaAPI.lua_toboolean(L, 1);
|
|||
|
int _layer = LuaAPI.xlua_tointeger(L, 2);
|
|||
|
|
|||
|
UIPanel gen_ret = NGUITools.CreateUI( _advanced3D, _layer );
|
|||
|
translator.Push(L, gen_ret);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 1;
|
|||
|
}
|
|||
|
if(gen_param_count == 3&& translator.Assignable<UnityEngine.Transform>(L, 1)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
|
|||
|
{
|
|||
|
UnityEngine.Transform _trans = (UnityEngine.Transform)translator.GetObject(L, 1, typeof(UnityEngine.Transform));
|
|||
|
bool _advanced3D = LuaAPI.lua_toboolean(L, 2);
|
|||
|
int _layer = LuaAPI.xlua_tointeger(L, 3);
|
|||
|
|
|||
|
UIPanel gen_ret = NGUITools.CreateUI( _trans, _advanced3D, _layer );
|
|||
|
translator.Push(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 NGUITools.CreateUI!");
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_SetChildLayer_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.Transform _t = (UnityEngine.Transform)translator.GetObject(L, 1, typeof(UnityEngine.Transform));
|
|||
|
int _layer = LuaAPI.xlua_tointeger(L, 2);
|
|||
|
|
|||
|
NGUITools.SetChildLayer( _t, _layer );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_AddSprite_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|||
|
|
|||
|
if(gen_param_count == 4&& translator.Assignable<UnityEngine.GameObject>(L, 1)&& translator.Assignable<UIAtlas>(L, 2)&& (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4))
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
UIAtlas _atlas = (UIAtlas)translator.GetObject(L, 2, typeof(UIAtlas));
|
|||
|
string _spriteName = LuaAPI.lua_tostring(L, 3);
|
|||
|
int _depth = LuaAPI.xlua_tointeger(L, 4);
|
|||
|
|
|||
|
UISprite gen_ret = NGUITools.AddSprite( _go, _atlas, _spriteName, _depth );
|
|||
|
translator.Push(L, gen_ret);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 1;
|
|||
|
}
|
|||
|
if(gen_param_count == 3&& translator.Assignable<UnityEngine.GameObject>(L, 1)&& translator.Assignable<UIAtlas>(L, 2)&& (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING))
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
UIAtlas _atlas = (UIAtlas)translator.GetObject(L, 2, typeof(UIAtlas));
|
|||
|
string _spriteName = LuaAPI.lua_tostring(L, 3);
|
|||
|
|
|||
|
UISprite gen_ret = NGUITools.AddSprite( _go, _atlas, _spriteName );
|
|||
|
translator.Push(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 NGUITools.AddSprite!");
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_GetRoot_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
|
|||
|
UnityEngine.GameObject gen_ret = NGUITools.GetRoot( _go );
|
|||
|
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_Destroy_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.Object _obj = (UnityEngine.Object)translator.GetObject(L, 1, typeof(UnityEngine.Object));
|
|||
|
|
|||
|
NGUITools.Destroy( _obj );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_DestroyImmediate_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.Object _obj = (UnityEngine.Object)translator.GetObject(L, 1, typeof(UnityEngine.Object));
|
|||
|
|
|||
|
NGUITools.DestroyImmediate( _obj );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_Broadcast_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|||
|
|
|||
|
if(gen_param_count == 1&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING))
|
|||
|
{
|
|||
|
string _funcName = LuaAPI.lua_tostring(L, 1);
|
|||
|
|
|||
|
NGUITools.Broadcast( _funcName );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
if(gen_param_count == 2&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)&& translator.Assignable<object>(L, 2))
|
|||
|
{
|
|||
|
string _funcName = LuaAPI.lua_tostring(L, 1);
|
|||
|
object _param = translator.GetObject(L, 2, typeof(object));
|
|||
|
|
|||
|
NGUITools.Broadcast( _funcName, _param );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
return LuaAPI.luaL_error(L, "invalid arguments to NGUITools.Broadcast!");
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_IsChild_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.Transform _parent = (UnityEngine.Transform)translator.GetObject(L, 1, typeof(UnityEngine.Transform));
|
|||
|
UnityEngine.Transform _child = (UnityEngine.Transform)translator.GetObject(L, 2, typeof(UnityEngine.Transform));
|
|||
|
|
|||
|
bool gen_ret = NGUITools.IsChild( _parent, _child );
|
|||
|
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_SetActive_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|||
|
|
|||
|
if(gen_param_count == 2&& translator.Assignable<UnityEngine.GameObject>(L, 1)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2))
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
bool _state = LuaAPI.lua_toboolean(L, 2);
|
|||
|
|
|||
|
NGUITools.SetActive( _go, _state );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
if(gen_param_count == 3&& translator.Assignable<UnityEngine.GameObject>(L, 1)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3))
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
bool _state = LuaAPI.lua_toboolean(L, 2);
|
|||
|
bool _compatibilityMode = LuaAPI.lua_toboolean(L, 3);
|
|||
|
|
|||
|
NGUITools.SetActive( _go, _state, _compatibilityMode );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
return LuaAPI.luaL_error(L, "invalid arguments to NGUITools.SetActive!");
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_SetActiveChildren_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
bool _state = LuaAPI.lua_toboolean(L, 2);
|
|||
|
|
|||
|
NGUITools.SetActiveChildren( _go, _state );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_GetActive_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|||
|
|
|||
|
if(gen_param_count == 1&& translator.Assignable<UnityEngine.Behaviour>(L, 1))
|
|||
|
{
|
|||
|
UnityEngine.Behaviour _mb = (UnityEngine.Behaviour)translator.GetObject(L, 1, typeof(UnityEngine.Behaviour));
|
|||
|
|
|||
|
bool gen_ret = NGUITools.GetActive( _mb );
|
|||
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 1;
|
|||
|
}
|
|||
|
if(gen_param_count == 1&& translator.Assignable<UnityEngine.GameObject>(L, 1))
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
|
|||
|
bool gen_ret = NGUITools.GetActive( _go );
|
|||
|
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 NGUITools.GetActive!");
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_SetActiveSelf_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
bool _state = LuaAPI.lua_toboolean(L, 2);
|
|||
|
|
|||
|
NGUITools.SetActiveSelf( _go, _state );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_SetLayer_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
int _layer = LuaAPI.xlua_tointeger(L, 2);
|
|||
|
|
|||
|
NGUITools.SetLayer( _go, _layer );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_Round_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.Vector3 _v;translator.Get(L, 1, out _v);
|
|||
|
|
|||
|
UnityEngine.Vector3 gen_ret = NGUITools.Round( _v );
|
|||
|
translator.PushUnityEngineVector3(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_MakePixelPerfect_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.Transform _t = (UnityEngine.Transform)translator.GetObject(L, 1, typeof(UnityEngine.Transform));
|
|||
|
|
|||
|
NGUITools.MakePixelPerfect( _t );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_Save_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
string _fileName = LuaAPI.lua_tostring(L, 1);
|
|||
|
byte[] _bytes = LuaAPI.lua_tobytes(L, 2);
|
|||
|
|
|||
|
bool gen_ret = NGUITools.Save( _fileName, _bytes );
|
|||
|
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_Load_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
string _fileName = LuaAPI.lua_tostring(L, 1);
|
|||
|
|
|||
|
byte[] gen_ret = NGUITools.Load( _fileName );
|
|||
|
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_ApplyPMA_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.Color _c;translator.Get(L, 1, out _c);
|
|||
|
|
|||
|
UnityEngine.Color gen_ret = NGUITools.ApplyPMA( _c );
|
|||
|
translator.PushUnityEngineColor(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_MarkParentAsChanged_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
|
|||
|
NGUITools.MarkParentAsChanged( _go );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_GetFuncName_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
object _obj = translator.GetObject(L, 1, typeof(object));
|
|||
|
string _method = LuaAPI.lua_tostring(L, 2);
|
|||
|
|
|||
|
string gen_ret = NGUITools.GetFuncName( _obj, _method );
|
|||
|
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_ImmediatelyCreateDrawCalls_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.GameObject _root = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
|
|||
|
NGUITools.ImmediatelyCreateDrawCalls( _root );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_KeyToCaption_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.KeyCode _key;if (LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TNUMBER)_key = (UnityEngine.KeyCode)LuaAPI.lua_tonumber(L, 1);else translator.Get(L, 1, out _key);
|
|||
|
|
|||
|
string gen_ret = NGUITools.KeyToCaption( _key );
|
|||
|
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_GetVertsColor_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.Vector4 _v;translator.Get(L, 1, out _v);
|
|||
|
UnityEngine.Vector3 _pos;translator.Get(L, 2, out _pos);
|
|||
|
UnityEngine.Color _clt;translator.Get(L, 3, out _clt);
|
|||
|
UnityEngine.Color _clb;translator.Get(L, 4, out _clb);
|
|||
|
UnityEngine.Color _crt;translator.Get(L, 5, out _crt);
|
|||
|
UnityEngine.Color _crb;translator.Get(L, 6, out _crb);
|
|||
|
|
|||
|
UnityEngine.Color gen_ret = NGUITools.GetVertsColor( _v, _pos, _clt, _clb, _crt, _crb );
|
|||
|
translator.PushUnityEngineColor(L, gen_ret);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_soundVolume(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
LuaAPI.lua_pushnumber(L, NGUITools.soundVolume);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_fileAccess(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
LuaAPI.lua_pushboolean(L, NGUITools.fileAccess);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_clipboard(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
LuaAPI.lua_pushstring(L, NGUITools.clipboard);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_screenSize(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
translator.PushUnityEngineVector2(L, NGUITools.screenSize);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_keys(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
translator.Push(L, NGUITools.keys);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _s_set_soundVolume(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
NGUITools.soundVolume = (float)LuaAPI.lua_tonumber(L, 1);
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _s_set_clipboard(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
NGUITools.clipboard = LuaAPI.lua_tostring(L, 1);
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _s_set_keys(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
NGUITools.keys = (UnityEngine.KeyCode[])translator.GetObject(L, 1, typeof(UnityEngine.KeyCode[]));
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
}
|