MrGravity.LevelChoice.SubmitScore C# (CSharp) Méthode

SubmitScore() public méthode

Submits new scores for the 3 scoring factors for this level, and if the new score is higher than previously recorded it makes note of this. Scores should be between values of 0 and 3.
public SubmitScore ( int timerStar, int collectionStar, int deathStar ) : void
timerStar int High Score for the Timer stars
collectionStar int High Score for the Collection stars
deathStar int High Score for the Death stars
Résultat void
        public void SubmitScore(int timerStar, int collectionStar, int deathStar)
        {
            if (timerStar > TimerStar)
            {
                if (timerStar > 3)
                    TimerStar = 3;
                else if (timerStar < 0)
                    TimerStar = 0;
                else
                    TimerStar = timerStar;
            }

            if (collectionStar > CollectionStar)
            {
                if (collectionStar > 3)
                    CollectionStar = 3;
                else if (collectionStar < 0)
                    CollectionStar = 0;
                else
                    CollectionStar = collectionStar;
            }

            if (deathStar > DeathStar)
            {
                if (deathStar > 3)
                    DeathStar = 3;
                else if (deathStar < 0)
                    DeathStar = 0;
                else
                    DeathStar = deathStar;
            }
        }