Exemplo n.º 1
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;
        }
Exemplo n.º 2
0
 /** Sets the attachment and resets {@link #getAttachmentTime()}.
  * @param attachment May be null. */
 public void SetAttachment(Attachment attachment)
 {
     // TODO - compare with corona
     this.Attachment = attachment;
     this.attachmentTime = this.Skeleton.Time;
 }