public T LoadUnit <T>(string aFileName)
            where T : Unit, new()
        {
            if (!File.Exists(aFileName))
            {
                return(null);
            }

            ClassSerialisation <T> CS = new ClassSerialisation <T>();

            var lUnit = CS.LoadClass(aFileName);

            return(lUnit);
        }
Exemple #2
0
        public override void SaveToFile()
        {
            var lClassSerialisation = new ClassSerialisation <MeleeUnit>();

            lClassSerialisation.SaveClass(FileName, this);
        }
Exemple #3
0
        public override void SaveToFile()
        {
            var lClassSerialisation = new ClassSerialisation <ResourceBuilding>();

            lClassSerialisation.SaveClass(FileName, this);
        }
        public override void SaveToFile()
        {
            var lClassSerialisation = new ClassSerialisation <FactoryBuilding <T> >();

            lClassSerialisation.SaveClass(FileName, this);
        }