Пример #1
0
        public Bone(BoneData data, Bone parent)
        {
            if (data == null)
            {
                throw new ArgumentException ("data cannot be null.");
            }

            this.Data = data;
            this.Parent = parent;
        }
Пример #2
0
        /** Copy constructor.
         * @param parent May be null. */
        public Bone(Bone bone, Bone parent)
        {
            if (bone == null)
            {
                throw new ArgumentException ("bone cannot be null.");
            }

            this.Parent = parent;
            Data = bone.Data;
            X = bone.X;
            Y = bone.Y;
            rotation = bone.rotation;
            scaleX = bone.scaleX;
            scaleY = bone.scaleY;
        }
Пример #3
0
 public Slot(SlotData data, Skeleton skeleton, Bone bone)
 {
     if (data == null)
     {
         throw new ArgumentException ("data cannot be null.");
     }
     if (skeleton == null)
     {
         throw new ArgumentException ("skeleton cannot be null.");
     }
     if (bone == null)
     {
         throw new ArgumentException ("bone cannot be null.");
     }
     this.Data = data;
     this.Skeleton = skeleton;
     this.Bone = bone;
     this.Color = new Color (1, 1, 1, 1);
     this.SetToBindPose ();
 }
Пример #4
0
        /** Copy constructor. */
        public Slot(Slot slot, Skeleton skeleton, Bone bone)
        {
            if (slot == null)
            {
                throw new ArgumentException ("slot cannot be null.");
            }
            if (skeleton == null)
            {
                throw new ArgumentException ("skeleton cannot be null.");
            }
            if (bone == null)
            {
                throw new ArgumentException ("bone cannot be null.");
            }

            Data = slot.Data;
            this.Skeleton = skeleton;
            this.Bone = bone;
            Color = slot.Color;
            attachment = slot.attachment;
            attachmentTime = slot.attachmentTime;
        }