Exemplo n.º 1
0
        internal static void UpdateProgressState(ModLoadStep step)
        {
            if (progressBar == null)
            {
                return;
            }

            progressBar.progress = ProgressParser.SetModState(step, ref progressBar.text);
        }
Exemplo n.º 2
0
        internal static void UpdateProgressState(ModLoadStep step)
        {
            if (UIStyleValues.ProgressBar == null)
            {
                return;
            }

            UIStyleValues.ProgressBar.progress     = ProgressParser.SetModState(step, ref UIStyleValues.ProgressBar.text.text);
            UIStyleValues.ProgressBar.text.isDirty = true;
        }
Exemplo n.º 3
0
        public static float SetModState(ModLoadStep step, ref string progressText)
        {
            currentStep = step;
            if (!stepsNames.TryGetValue(step, out currentStepName))
            {
                currentStepName = $"{step}";
            }
            progressText = currentStepName;

            float generationPart = generationPercent * 0.01f;

            return(generationPart + (((int)currentStep - 1) * ((1 - generationPart) / 5)));
        }