Exemplo n.º 1
0
        public StatsFields CloneAndChangeOwner(IStatsOwner owner)
        {
            StatsFields statsFields = new StatsFields(owner);

            statsFields.Fields = this.Fields.ToDictionary((System.Collections.Generic.KeyValuePair <PlayerFields, StatsData> x) => x.Key, (System.Collections.Generic.KeyValuePair <PlayerFields, StatsData> x) => x.Value.CloneAndChangeOwner(owner));
            return(statsFields);
        }
Exemplo n.º 2
0
        public void InitializeFromStats(StatsFields fields)
        {
            Fields.Clear();

            foreach (var field in fields.Fields)
            {
                Fields.Add(field.Key, field.Value.CloneAndChangeOwner(Owner));
            }
        }