Пример #1
0
        /// <summary>
        /// Clones the block sounds.
        /// </summary>
        /// <returns></returns>
        public BlockSounds Clone()
        {
            BlockSounds sounds = new BlockSounds()
            {
                Walk              = Walk == null ? null : Walk.Clone(),
                Inside            = Inside == null ? null : Inside.Clone(),
                Break             = Break == null ? null : Break.Clone(),
                Place             = Place == null ? null : Place.Clone(),
                Hit               = Hit == null ? null : Hit.Clone(),
                Ambient           = Ambient == null ? null : Ambient.Clone(),
                AmbientBlockCount = AmbientBlockCount
            };

            foreach (var val in ByTool)
            {
                sounds.ByTool[val.Key] = val.Value.Clone();
            }

            return(sounds);
        }