ScoreKeeper.AliveScoreTicker C# (CSharp) Метод

AliveScoreTicker() публичный Метод

public AliveScoreTicker ( ) : IEnumerator
Результат IEnumerator
    public IEnumerator AliveScoreTicker()
    {
        //this loop will run forever so you can just call AddScore and the ticker will continue automatically
        while (true){
            if(!playerCharacter.playerDead){
                //Use the Ticker function to rapidly increment toward the actual score
                ScoreKeeper.DisplayScore = Ticker(ScoreKeeper.DisplayScore, ScoreKeeper.Score, scoreTickInterval);
            }
            //wait for some time before incrementing again
            yield return new WaitForSeconds(scoreTickSpeed);
        }
    }