Ejemplo n.º 1
0
        private AnimationSettingsCollection <CustomPose> GetSettingsCollection(string path)
        {
            if (string.IsNullOrEmpty(path))
            {
                return(null);
            }

            if (!_settings.ContainsKey(path))
            {
                _settings[path] = new AnimationSettingsCollection <CustomPose>(Path.Combine(_rootDirectory, $"{path}.txt"));
            }

            return(_settings[path]);
        }
Ejemplo n.º 2
0
        public void Reload()
        {
            lock (locker)
            {
                _settings = Directory.GetFiles(_rootDirectory, "*.txt", SearchOption.AllDirectories)
                            .OrderBy(x => x)
                            .Select(x => new AnimationSettingsCollection <AnimationFlags>(x))
                            .ToList();

                _defaultSetting = new AnimationSettingsCollection <AnimationFlags>(_defaultFile);
                _dumpSetting    = new AnimationSettingsCollection <AnimationFlags>(_dumpFile);

                _settings.Add(_defaultSetting);
                _settings.Add(_dumpSetting);

                _cache.Clear();
            }
        }