Ejemplo n.º 1
0
        /// <summary>
        /// Clones the current <see cref="HudLayoutHeatMapTool" />
        /// </summary>
        /// <returns>Cloned <see cref="HudLayoutHeatMapTool" /></returns>
        public override HudLayoutTool Clone()
        {
            var cloned = new HudLayoutHeatMapTool
            {
                Id           = Id,
                BaseStat     = BaseStat?.Clone(),
                PositionInfo = PositionInfo?.Clone()
            };

            return(cloned);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Clones the current object
        /// </summary>
        /// <returns>Cloned <see cref="HudLayoutGraphTool" /></returns>
        public override HudLayoutTool Clone()
        {
            var cloned = new HudLayoutGraphTool
            {
                Id           = Id,
                BaseStat     = BaseStat?.Clone(),
                IsVertical   = IsVertical,
                ParentId     = ParentId,
                PositionInfo = PositionInfo?.Clone(),
                Stats        = new ReactiveList <StatInfo>(Stats.Select(x =>
                {
                    var statInfoBreak = x as StatInfoBreak;

                    if (statInfoBreak != null)
                    {
                        return(statInfoBreak.Clone());
                    }

                    return(x.Clone());
                }))
            };

            return(cloned);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Clones the current <see cref="HudLayoutGaugeIndicator" />
        /// </summary>
        /// <returns>Cloned <see cref="HudLayoutGaugeIndicator" /></returns>
        public override HudLayoutTool Clone()
        {
            var cloned = new HudLayoutGaugeIndicator
            {
                Id       = Id,
                BaseStat = BaseStat?.Clone(),
                Stats    = new ReactiveList <StatInfo>(Stats.Select(x =>
                {
                    if (x is StatInfoBreak statInfoBreak)
                    {
                        return(statInfoBreak.Clone());
                    }

                    return(x.Clone());
                })),
                IsVertical   = IsVertical,
                Text         = Text,
                HeaderText   = HeaderText,
                PositionInfo = PositionInfo?.Clone(),
                Tools        = Tools != null ? new ReactiveList <HudLayoutTool>(Tools.Select(x => x.Clone())) : null
            };

            return(cloned);
        }