Kodingan Visual Basic
Kodingan Visual Basic
End Sub
Private Sub gameOver()
Replay_Button.Visible = True
explosion.Visible = True
End_Text.Visible = True
RoadMover.Stop()
Enemy1_Mover.Stop()
Enemy2_Mover.Stop()
Enemy3_Mover.Stop()
End Sub
End Sub
EnemyCar1.Top += speed / 2
If EnemyCar1.Top >= Me.Height Then
Score += 1
Score_Text.Text = "Score " & Score
EnemyCar1.Top = -(CInt(Math.Ceiling(Rnd() * 150)) + EnemyCar1.Height)
EnemyCar1.Left = CInt(Math.Ceiling(Rnd() * 50)) + 0
End If
End Sub
End Sub
End Sub
End Sub
End Class