Пример #1
0
        private void LoadLevelUpDefinitions()
        {
            levelUpDefinitions = new Dictionary <int, LevelUpDefinition>();

            ResourceDataFile fileReader = new ResourceDataFile(@"Data/LevelUp");
            int levelUpCount            = fileReader.ReadInt();

            for (int i = 0; i < levelUpCount; i++)
            {
                LevelUpDefinition def = LevelUpDefinition.ReadFromFile(fileReader);
                levelUpDefinitions[def.DefinitionId] = def;
            }
        }
Пример #2
0
        public static LevelUpDefinition ReadFromFile(ResourceDataFile reader)
        {
            LevelUpDefinition def = new LevelUpDefinition();

            def.DefinitionId = reader.ReadInt();

            def.HpRange = reader.ReadSpan();
            def.MpRange = reader.ReadSpan();
            def.ApRange = reader.ReadSpan();
            def.DpRange = reader.ReadSpan();
            def.DxRange = reader.ReadSpan();

            return(def);
        }