public static SpellModelView Deserialize(System.IO.StreamReader input)
        {
            SpellModelView _obj = new SpellModelView();
            // ID
            int _obj_ID = Int32.Parse(input.ReadLine());

            _obj.ID = (int)_obj_ID;
            // Levels
            List <SpellLevelDescriptionView> _obj_Levels = new List <SpellLevelDescriptionView>();
            int _obj_Levels_count = Int32.Parse(input.ReadLine());

            for (int _obj_Levels_i = 0; _obj_Levels_i < _obj_Levels_count; _obj_Levels_i++)
            {
                SpellLevelDescriptionView _obj_Levels_e = SpellLevelDescriptionView.Deserialize(input);
                _obj_Levels.Add((SpellLevelDescriptionView)_obj_Levels_e);
            }
            _obj.Levels = (List <SpellLevelDescriptionView>)_obj_Levels;
            return(_obj);
        }
Exemple #2
0
        public static GameStaticDataView Deserialize(System.IO.StreamReader input)
        {
            GameStaticDataView _obj = new GameStaticDataView();
            // CampsPositions
            List <Vector2> _obj_CampsPositions       = new List <Vector2>();
            int            _obj_CampsPositions_count = Int32.Parse(input.ReadLine());

            for (int _obj_CampsPositions_i = 0; _obj_CampsPositions_i < _obj_CampsPositions_count; _obj_CampsPositions_i++)
            {
                Vector2 _obj_CampsPositions_e = Vector2.Deserialize(input);
                _obj_CampsPositions.Add((Vector2)_obj_CampsPositions_e);
            }
            _obj.CampsPositions = (List <Vector2>)_obj_CampsPositions;
            // RouterPositions
            List <Vector2> _obj_RouterPositions       = new List <Vector2>();
            int            _obj_RouterPositions_count = Int32.Parse(input.ReadLine());

            for (int _obj_RouterPositions_i = 0; _obj_RouterPositions_i < _obj_RouterPositions_count; _obj_RouterPositions_i++)
            {
                Vector2 _obj_RouterPositions_e = Vector2.Deserialize(input);
                _obj_RouterPositions.Add((Vector2)_obj_RouterPositions_e);
            }
            _obj.RouterPositions = (List <Vector2>)_obj_RouterPositions;
            // VirusCheckpoints
            List <EntityBaseView> _obj_VirusCheckpoints = new List <EntityBaseView>();
            int _obj_VirusCheckpoints_count             = Int32.Parse(input.ReadLine());

            for (int _obj_VirusCheckpoints_i = 0; _obj_VirusCheckpoints_i < _obj_VirusCheckpoints_count; _obj_VirusCheckpoints_i++)
            {
                EntityBaseView _obj_VirusCheckpoints_e = EntityBaseView.Deserialize(input);
                _obj_VirusCheckpoints.Add((EntityBaseView)_obj_VirusCheckpoints_e);
            }
            _obj.VirusCheckpoints = (List <EntityBaseView>)_obj_VirusCheckpoints;
            // Weapons
            List <WeaponModelView> _obj_Weapons = new List <WeaponModelView>();
            int _obj_Weapons_count = Int32.Parse(input.ReadLine());

            for (int _obj_Weapons_i = 0; _obj_Weapons_i < _obj_Weapons_count; _obj_Weapons_i++)
            {
                WeaponModelView _obj_Weapons_e = WeaponModelView.Deserialize(input);
                _obj_Weapons.Add((WeaponModelView)_obj_Weapons_e);
            }
            _obj.Weapons = (List <WeaponModelView>)_obj_Weapons;
            // Armors
            List <PassiveEquipmentModelView> _obj_Armors = new List <PassiveEquipmentModelView>();
            int _obj_Armors_count = Int32.Parse(input.ReadLine());

            for (int _obj_Armors_i = 0; _obj_Armors_i < _obj_Armors_count; _obj_Armors_i++)
            {
                PassiveEquipmentModelView _obj_Armors_e = PassiveEquipmentModelView.Deserialize(input);
                _obj_Armors.Add((PassiveEquipmentModelView)_obj_Armors_e);
            }
            _obj.Armors = (List <PassiveEquipmentModelView>)_obj_Armors;
            // Boots
            List <PassiveEquipmentModelView> _obj_Boots = new List <PassiveEquipmentModelView>();
            int _obj_Boots_count = Int32.Parse(input.ReadLine());

            for (int _obj_Boots_i = 0; _obj_Boots_i < _obj_Boots_count; _obj_Boots_i++)
            {
                PassiveEquipmentModelView _obj_Boots_e = PassiveEquipmentModelView.Deserialize(input);
                _obj_Boots.Add((PassiveEquipmentModelView)_obj_Boots_e);
            }
            _obj.Boots = (List <PassiveEquipmentModelView>)_obj_Boots;
            // Enchants
            List <WeaponEnchantModelView> _obj_Enchants = new List <WeaponEnchantModelView>();
            int _obj_Enchants_count = Int32.Parse(input.ReadLine());

            for (int _obj_Enchants_i = 0; _obj_Enchants_i < _obj_Enchants_count; _obj_Enchants_i++)
            {
                WeaponEnchantModelView _obj_Enchants_e = WeaponEnchantModelView.Deserialize(input);
                _obj_Enchants.Add((WeaponEnchantModelView)_obj_Enchants_e);
            }
            _obj.Enchants = (List <WeaponEnchantModelView>)_obj_Enchants;
            // Spells
            List <SpellModelView> _obj_Spells = new List <SpellModelView>();
            int _obj_Spells_count             = Int32.Parse(input.ReadLine());

            for (int _obj_Spells_i = 0; _obj_Spells_i < _obj_Spells_count; _obj_Spells_i++)
            {
                SpellModelView _obj_Spells_e = SpellModelView.Deserialize(input);
                _obj_Spells.Add((SpellModelView)_obj_Spells_e);
            }
            _obj.Spells = (List <SpellModelView>)_obj_Spells;
            // Structures
            List <EntityBaseView> _obj_Structures = new List <EntityBaseView>();
            int _obj_Structures_count             = Int32.Parse(input.ReadLine());

            for (int _obj_Structures_i = 0; _obj_Structures_i < _obj_Structures_count; _obj_Structures_i++)
            {
                EntityBaseView _obj_Structures_e = EntityBaseView.Deserialize(input);
                _obj_Structures.Add((EntityBaseView)_obj_Structures_e);
            }
            _obj.Structures = (List <EntityBaseView>)_obj_Structures;
            // Map
            MapView _obj_Map = MapView.Deserialize(input);

            _obj.Map = (MapView)_obj_Map;
            return(_obj);
        }