Пример #1
0
    static int set_userData(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            DragonBones.DragonBonesData obj  = (DragonBones.DragonBonesData)o;
            DragonBones.CustomData      arg0 = (DragonBones.CustomData)ToLua.CheckObject(L, 2, typeof(DragonBones.CustomData));
            obj.userData = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index userData on a nil value" : e.Message));
        }
    }
    static int set_data(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            DragonBones.EventObject obj  = (DragonBones.EventObject)o;
            DragonBones.CustomData  arg0 = (DragonBones.CustomData)ToLua.CheckObject <DragonBones.CustomData>(L, 2);
            obj.data = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index data on a nil value"));
        }
    }
Пример #3
0
    static int get_userData(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            DragonBones.DragonBonesData obj = (DragonBones.DragonBonesData)o;
            DragonBones.CustomData      ret = obj.userData;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index userData on a nil value" : e.Message));
        }
    }
    static int get_data(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            DragonBones.EventObject obj = (DragonBones.EventObject)o;
            DragonBones.CustomData  ret = obj.data;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index data on a nil value"));
        }
    }