Example #1
0
        /// <summary>
        /// Creates a copy of the current <see cref="HudLayoutInfoV2"/> instance
        /// </summary>
        /// <returns>Copy of the current <see cref="HudLayoutInfoV2"/> instance</returns>
        public HudLayoutInfoV2 Clone()
        {
            var cloned = new HudLayoutInfoV2
            {
                Name                  = Name,
                IsDefault             = IsDefault,
                Opacity               = Opacity,
                TableType             = TableType,
                HudBumperStickerTypes = HudBumperStickerTypes.Select(x => x.Clone()).ToList(),
                HudPlayerTypes        = HudPlayerTypes.Select(x => x.Clone()).ToList(),
                LayoutTools           = LayoutTools.Select(x => x.Clone()).ToList(),
                Filter                = Filter?.Clone(),
                TrackMeterPositions   = TrackMeterPositions?.Select(x => x.Clone()).ToList()
            };

            return(cloned);
        }