Пример #1
0
    static int IsActive(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 1);
        UIBehaviour obj = (UIBehaviour)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UIBehaviour");
        bool        o   = obj.IsActive();

        LuaScriptMgr.Push(L, o);
        return(1);
    }
    public static int IsActive(IntPtr l)
    {
        int result;

        try
        {
            UIBehaviour uibehaviour = (UIBehaviour)LuaObject.checkSelf(l);
            bool        b           = uibehaviour.IsActive();
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, b);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    private static int IsActive(IntPtr L)
    {
        int result;

        try
        {
            ToLua.CheckArgsCount(L, 1);
            UIBehaviour uIBehaviour = (UIBehaviour)ToLua.CheckObject(L, 1, typeof(UIBehaviour));
            bool        value       = uIBehaviour.IsActive();
            LuaDLL.lua_pushboolean(L, value);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaDLL.toluaL_exception(L, e, null);
        }
        return(result);
    }