Exemple #1
0
    public IEnumerator startIncrementing(PlayerGrade test)
    {
        float       t          = 0.0f;
        int         startValue = (int)PlayerGrade.F;
        int         newvalue   = startValue + (int)test;
        PlayerGrade goalGrade  = (PlayerGrade)newvalue;

        while (gradeText.text != goalGrade.ToString())
        {
            currentInt = Mathf.Lerp(startValue, newvalue, t);
            float gradientValue = currentInt / 8;
            t += 0.65f * Time.fixedDeltaTime;
            PlayerGrade grade = (PlayerGrade)currentInt;
            gradeText.text  = grade.ToString();
            gradeText.color = gradient.Evaluate(gradientValue);
            yield return(null);
        }
    }
Exemple #2
0
 // Start is called before the first frame update
 void Start()
 {
     testGrade = Grader.getGrade(PlayerDataHolder.Current.GeneralRanking.StatFloat);
     StartCoroutine(startIncrementing(testGrade));
 }
 public AddPlayerViewModel(AddPlayer addPlayerPage)
 {
     m_addPlayerPage = addPlayerPage;
     m_selectedGrade = PlayerGrade.C;
 }