Exemplo n.º 1
0
        public static void LoadResources(Action <float, string, string> progress)
        {
            I18N.Load(t => progress(t * 0.5f, "Loading", "Translations"));

            progress(0.5f, "system.loading.resources.clearCache", "");
            ResourceReader.ClearCache();

            var part  = 1f / PluginDlls.Count;
            var total = 0f;

            foreach (var plugin in PluginDlls)
            {
                progress(0.5f + total * 0.5f, "system.loading.resources.plugin", plugin.Value.PluginAttribute.Name);
                total += part;
                plugin.Value.Plugin.LoadResources(plugin.Value);
            }
        }