예제 #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;
        }