Esempio n. 1
0
 public static void GotoProgress(AnimatedProgress animatedProgress)
 {
     StopAtNormalizedTime(
         animatedProgress.animator,
         animatedProgress.animationName,
         animatedProgress.progress
         );
 }
Esempio n. 2
0
        public void Display(AnimatedProgress results)
        {
            m_Results = results;
            int accuracyPercent = (int)Mathf.Round(100 * results.progress);

            m_ResultsUI.accuracyText.text = accuracyPercent.ToString() + "%";

            m_ResultsUI.animator.speed = 1f;
            m_ResultsUI.animator.Play(m_ResultsUI.animationName, -1, 0f);
        }
Esempio n. 3
0
 public static void CalculateProgress(ref AnimatedProgress animatedProgress)
 {
     if (animatedProgress.total <= animatedProgress.quantity ||
         animatedProgress.total == 0f)
     {
         animatedProgress.progress = 1f;
     }
     else
     {
         animatedProgress.progress = animatedProgress.quantity / animatedProgress.total;
     }
 }
Esempio n. 4
0
 public static void UpdateProgress(ref AnimatedProgress animatedProgress)
 {
     CalculateProgress(ref animatedProgress);
     GotoProgress(animatedProgress);
 }
Esempio n. 5
0
 public static void GotoProgress(AnimatedProgress animatedProgress, float progress)
 {
     animatedProgress.progress = progress;
     GotoProgress(animatedProgress);
 }