static int AddSlot(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         DragonBones.ArmatureData obj  = (DragonBones.ArmatureData)ToLua.CheckObject(L, 1, typeof(DragonBones.ArmatureData));
         DragonBones.SlotData     arg0 = (DragonBones.SlotData)ToLua.CheckObject(L, 2, typeof(DragonBones.SlotData));
         obj.AddSlot(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int AddSlotTimeline(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         DragonBones.AnimationData obj  = (DragonBones.AnimationData)ToLua.CheckObject <DragonBones.AnimationData>(L, 1);
         DragonBones.SlotData      arg0 = (DragonBones.SlotData)ToLua.CheckObject <DragonBones.SlotData>(L, 2);
         DragonBones.TimelineData  arg1 = (DragonBones.TimelineData)ToLua.CheckObject <DragonBones.TimelineData>(L, 3);
         obj.AddSlotTimeline(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int GetSlot(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         DragonBones.ArmatureData obj = (DragonBones.ArmatureData)ToLua.CheckObject(L, 1, typeof(DragonBones.ArmatureData));
         string arg0            = ToLua.CheckString(L, 2);
         DragonBones.SlotData o = obj.GetSlot(arg0);
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Пример #4
0
    static int get_slot(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            DragonBones.ActionData obj = (DragonBones.ActionData)o;
            DragonBones.SlotData   ret = obj.slot;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index slot on a nil value" : e.Message));
        }
    }
Пример #5
0
    static int set_slot(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            DragonBones.ActionData obj  = (DragonBones.ActionData)o;
            DragonBones.SlotData   arg0 = (DragonBones.SlotData)ToLua.CheckObject(L, 2, typeof(DragonBones.SlotData));
            obj.slot = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index slot on a nil value" : e.Message));
        }
    }
 /// <private/>
 protected abstract Slot _BuildSlot(BuildArmaturePackage dataPackage, SlotData slotData, Armature armature);
Пример #7
0
 private static int _onSortSlots(SlotData a, SlotData b)
 {
     return(a.zOrder > b.zOrder ? 1 : -1);
 }
Пример #8
0
        /// <inheritDoc/>
        protected override void _OnClear()
        {
            base._OnClear();

            var disposeDisplayList = new List <object>();

            for (int i = 0, l = _displayList.Count; i < l; ++i)
            {
                var eachDisplay = _displayList[i];
                if (eachDisplay != _rawDisplay && eachDisplay != _meshDisplay && !disposeDisplayList.Contains(eachDisplay))
                {
                    disposeDisplayList.Add(eachDisplay);
                }
            }

            for (int i = 0, l = disposeDisplayList.Count; i < l; ++i)
            {
                var eachDisplay = disposeDisplayList[i];
                if (eachDisplay is Armature)
                {
                    (eachDisplay as Armature).Dispose();
                }
                else
                {
                    _DisposeDisplay(eachDisplay, false);
                }
            }

            if (this._meshDisplay != null && this._meshDisplay != this._rawDisplay)
            {
                // May be _meshDisplay and _rawDisplay is the same one.
                this._DisposeDisplay(this._meshDisplay, false);
            }

            if (this._rawDisplay != null)
            {
                this._DisposeDisplay(this._rawDisplay, false);
            }

            this.displayController = null;

            this._displayDirty             = false;
            this._zOrderDirty              = false;
            this._blendModeDirty           = false;
            this._colorDirty               = false;
            this._meshDirty                = false;
            this._transformDirty           = false;
            this._skinedMeshTransformDirty = false;
            this._visible               = true;
            this._blendMode             = BlendMode.Normal;
            this._displayIndex          = -1;
            this._animationDisplayIndex = -1;
            this._zOrder           = 0;
            this._cachedFrameIndex = -1;
            this._pivotX           = 0.0f;
            this._pivotY           = 0.0f;
            this._localMatrix.Identity();
            this._colorTransform.Identity();
            this._ffdVertices.Clear();
            this._displayList.Clear();
            this._displayDatas.Clear();
            this._meshBones.Clear();
            this._slotData           = null; //
            this._rawDisplayDatas    = null; //
            this._displayData        = null;
            this._textureData        = null;
            this._meshData           = null;
            this._boundingBoxData    = null;
            this._rawDisplay         = null;
            this._meshDisplay        = null;
            this._display            = null;
            this._childArmature      = null;
            this._cachedFrameIndices = null;
        }
Пример #9
0
 /**
  * @private
  */
 protected abstract Slot _BuildSlot(BuildArmaturePackage dataPackage, SlotData slotData, List <DisplayData> displays, Armature armature);