예제 #1
0
파일: Skin.cs 프로젝트: 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);
        }
예제 #2
0
파일: Skin.cs 프로젝트: kroer/MiNET
 public Skin()
 {
     Cape       = new Cape();
     Animations = new List <Animation>();
 }