Exemplo n.º 1
0
 static int InvalidUpdate(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         DragonBones.Bone obj = (DragonBones.Bone)ToLua.CheckObject(L, 1, typeof(DragonBones.Bone));
         obj.InvalidUpdate();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 2
0
 static int GetBones(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         DragonBones.Bone obj = (DragonBones.Bone)ToLua.CheckObject(L, 1, typeof(DragonBones.Bone));
         System.Collections.Generic.List <DragonBones.Bone> o = obj.GetBones();
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 3
0
 static int AddBone(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         DragonBones.Armature obj  = (DragonBones.Armature)ToLua.CheckObject(L, 1, typeof(DragonBones.Armature));
         DragonBones.Bone     arg0 = (DragonBones.Bone)ToLua.CheckObject(L, 2, typeof(DragonBones.Bone));
         string arg1 = ToLua.CheckString(L, 3);
         obj.AddBone(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 4
0
 static int GetBoneByDisplay(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         DragonBones.Armature obj = (DragonBones.Armature)ToLua.CheckObject(L, 1, typeof(DragonBones.Armature));
         object           arg0    = ToLua.ToVarObject(L, 2);
         DragonBones.Bone o       = obj.GetBoneByDisplay(arg0);
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int GetBone(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         DragonBones.Armature obj = (DragonBones.Armature)ToLua.CheckObject <DragonBones.Armature>(L, 1);
         string           arg0    = ToLua.CheckString(L, 2);
         DragonBones.Bone o       = obj.GetBone(arg0);
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 6
0
 static int Contains(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         DragonBones.Bone            obj  = (DragonBones.Bone)ToLua.CheckObject(L, 1, typeof(DragonBones.Bone));
         DragonBones.TransformObject arg0 = (DragonBones.TransformObject)ToLua.CheckObject(L, 2, typeof(DragonBones.TransformObject));
         bool o = obj.Contains(arg0);
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
    static int set_bone(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            DragonBones.EventObject obj  = (DragonBones.EventObject)o;
            DragonBones.Bone        arg0 = (DragonBones.Bone)ToLua.CheckObject <DragonBones.Bone>(L, 2);
            obj.bone = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index bone on a nil value"));
        }
    }
    static int get_bone(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            DragonBones.EventObject obj = (DragonBones.EventObject)o;
            DragonBones.Bone        ret = obj.bone;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index bone on a nil value"));
        }
    }
Exemplo n.º 9
0
    static int set_visible(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            DragonBones.Bone obj  = (DragonBones.Bone)o;
            bool             arg0 = LuaDLL.luaL_checkboolean(L, 2);
            obj.visible = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index visible on a nil value" : e.Message));
        }
    }
Exemplo n.º 10
0
    static int get_ik(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            DragonBones.Bone obj = (DragonBones.Bone)o;
            DragonBones.Bone ret = obj.ik;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index ik on a nil value" : e.Message));
        }
    }
Exemplo n.º 11
0
    static int set_ikWeight(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            DragonBones.Bone obj  = (DragonBones.Bone)o;
            float            arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
            obj.ikWeight = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index ikWeight on a nil value" : e.Message));
        }
    }
Exemplo n.º 12
0
    static int get_ikChainIndex(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            DragonBones.Bone obj = (DragonBones.Bone)o;
            int ret = obj.ikChainIndex;
            LuaDLL.lua_pushinteger(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index ikChainIndex on a nil value" : e.Message));
        }
    }
Exemplo n.º 13
0
    static int get_visible(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            DragonBones.Bone obj = (DragonBones.Bone)o;
            bool             ret = obj.visible;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index visible on a nil value" : e.Message));
        }
    }
Exemplo n.º 14
0
    static int get_length(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            DragonBones.Bone obj = (DragonBones.Bone)o;
            float            ret = obj.length;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index length on a nil value" : e.Message));
        }
    }
    static int set_bone(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            DragonBones.BoneTimelineState obj = (DragonBones.BoneTimelineState)o;
            DragonBones.Bone arg0             = (DragonBones.Bone)ToLua.CheckObject(L, 2, typeof(DragonBones.Bone));
            obj.bone = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index bone on a nil value" : e.Message));
        }
    }
Exemplo n.º 16
0
    static int _CreateDragonBones_Bone(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 0)
            {
                DragonBones.Bone obj = new DragonBones.Bone();
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: DragonBones.Bone.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }