71 lines
1.7 KiB
C#
71 lines
1.7 KiB
C#
//this source code was auto-generated by tolua#, do not modify it
|
|
using System;
|
|
using LuaInterface;
|
|
|
|
public class LuaUIHelperSpriteWrap
|
|
{
|
|
public static void Register(LuaState L)
|
|
{
|
|
L.BeginClass(typeof(LuaUIHelperSprite), typeof(UnityEngine.MonoBehaviour));
|
|
L.RegFunction("GetSprite", GetSprite);
|
|
L.RegFunction("GetSprites", GetSprites);
|
|
L.RegFunction("__eq", op_Equality);
|
|
L.RegFunction("__tostring", ToLua.op_ToString);
|
|
L.EndClass();
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int GetSprite(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
ToLua.CheckArgsCount(L, 2);
|
|
LuaUIHelperSprite obj = (LuaUIHelperSprite)ToLua.CheckObject<LuaUIHelperSprite>(L, 1);
|
|
string arg0 = ToLua.CheckString(L, 2);
|
|
UnityEngine.Sprite o = obj.GetSprite(arg0);
|
|
ToLua.PushSealed(L, o);
|
|
return 1;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int GetSprites(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
ToLua.CheckArgsCount(L, 1);
|
|
LuaUIHelperSprite obj = (LuaUIHelperSprite)ToLua.CheckObject<LuaUIHelperSprite>(L, 1);
|
|
UnityEngine.Sprite[] o = obj.GetSprites();
|
|
ToLua.Push(L, o);
|
|
return 1;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int op_Equality(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
ToLua.CheckArgsCount(L, 2);
|
|
UnityEngine.Object arg0 = (UnityEngine.Object)ToLua.ToObject(L, 1);
|
|
UnityEngine.Object arg1 = (UnityEngine.Object)ToLua.ToObject(L, 2);
|
|
bool o = arg0 == arg1;
|
|
LuaDLL.lua_pushboolean(L, o);
|
|
return 1;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
}
|
|
|