示例#1
0
    public override void _Process(float delta)
    {
        if (animateScore == null)
        {
            LastScoreLabel.Text = "0";
            BestScoreLabel.Text = Settings.LastBestScore.ToString();
            return;
        }

        if (++times < steps)
        {
            return;
        }
        times = 0;

        if (animateScore.Value)
        {
            LastScoreLabel.Text = animScore.ToString();
            animScore++;
            if (animScore > Settings.Score)
            {
                animateScore = false;
                if (Settings.BestScore > Settings.LastBestScore)
                {
                    TextNewRecord.Show();
                }
                BestScoreLabel.Text    = Settings.BestScore.ToString();
                Settings.LastBestScore = Settings.BestScore;
            }
            MedalInstance.ShowMedal(Settings.Score);
        }
    }