所以我有这个小游戏,我有一个学校的项目。这是我遇到问题的代码的一部分。
Public Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
C = C + 1
Label1.Text = Math.Round(clickey / C, 2)
Dim score As Double = clickey / C
score = Math.Round(score, 2)
Label2.Text = C
Label3.Text = clickey
Dim scoreH As Double
If score > scoreH Then
scoreH = score
scoreH = Math.Round(scoreH, 2)
Label8.Text = scoreH
End If
End Sub
如果当前分数大于高分,我会尝试这样做,然后将当前分数更改为最高分(如if语句中所示)。然而,无论如何,我用来显示高分的标签总是等于当前分数,即使当前分数低于最高分。 = P