Exemplo n.º 1
0
 /**
  * @language zh_CN
  * 将一个指定的插槽从骨架中移除。
  * @param value 需要移除的插槽
  * @see dragonBones.Slot
  * @version DragonBones 3.0
  */
 public void RemoveSlot(Slot value)
 {
     if (value != null && value.armature == this)
     {
         value._setParent(null);
         value._setArmature(null);
     }
     else
     {
         DragonBones.Warn("");
     }
 }
Exemplo n.º 2
0
        /**
         * @deprecated
         */
        public void AddSlot(Slot value, string parentName)
        {
            var bone = GetBone(parentName);

            if (bone != null)
            {
                value._setArmature(this);
                value._setParent(bone);
            }
            else
            {
                DragonBones.Assert(false, DragonBones.ARGUMENT_ERROR);
            }
        }
        /**
         * @language zh_CN
         * 将一个指定的插槽添加到骨架中。
         * @param value 需要添加的插槽。
         * @param parentName 需要添加到的父骨骼名称。
         * @see dragonBones.Slot
         * @version DragonBones 3.0
         */
        public void AddSlot(Slot value, string parentName)
        {
            var bone = GetBone(parentName);

            if (bone != null)
            {
                value._setArmature(this);
                value._setParent(bone);
            }
            else
            {
                DragonBones.Warn("");
            }
        }