Exemple #1
0
        public object Clone()
        {
            byte[] clonedSkinData = null;

            if (Data != null)
            {
                clonedSkinData = new byte[Data.Length];
                Data.CopyTo(clonedSkinData, 0);
            }

            var clonedSkin = new Skin
            {
                SkinId        = SkinId,
                GeometryData  = GeometryData,
                Slim          = Slim,
                Data          = clonedSkinData,
                Cape          = Cape == null ? null : (Cape)Cape.Clone(),
                IsPersonaSkin = IsPersonaSkin,
                IsPremiumSkin = IsPremiumSkin,
                ResourcePatch = ResourcePatch,
                Height        = Height,
                Width         = Width,
                GeometryName  = GeometryName,
                AnimationData = AnimationData,
            };

            foreach (Animation animation in Animations)
            {
                clonedSkin.Animations.Add((Animation)animation.Clone());
            }

            return(clonedSkin);
        }
Exemple #2
0
 public Skin()
 {
     Cape       = new Cape();
     Animations = new List <Animation>();
 }