Beispiel #1
0
        public Character(SerializationInfo info, StreamingContext context)
        {
            Allocations = new CharacterAllocations(this);

            foreach (SerializationEntry entry in info)
            {
                switch (entry.Name)
                {
                case "Name":
                    Name = (string)entry.Value;
                    break;

                case "Class":
                    Class = (string)entry.Value;
                    break;

                case "Level":
                    Level = (int)entry.Value;
                    break;

                case "Allocations":
                    Allocations.Points = (List <Allocation>)entry.Value;
                    break;

                case "Items":
                    Items = (List <Item>)entry.Value;
                    break;

                case "Meta":
                    Meta = (Dictionary <string, string>)entry.Value;
                    break;
                }
            }
        }
Beispiel #2
0
 public Character()
 {
     Allocations = new CharacterAllocations(this);
 }