Exemplo n.º 1
0
Arquivo: Skin.cs Projeto: kroer/MiNET
        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);
        }
Exemplo n.º 2
0
Arquivo: Skin.cs Projeto: kroer/MiNET
 public Skin()
 {
     Cape       = new Cape();
     Animations = new List <Animation>();
 }