减速车(Picturebox)

时间:2016-01-23 03:59:37

标签: vb.net picturebox

目前我正在开发一款游戏,我希望让这辆车慢慢完全停下来,而不是在放开钥匙后立即停下来。当前的移动代码如下。

Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As System.Windows.Forms.Keys) As Short

Private Sub MovementTimer_Tick(sender As Object, e As EventArgs) Handles MovementTimer.Tick

    If GetAsyncKeyState(Keys.Up) <> 0 Then
        Car.Top -= 6
    End If
    If GetAsyncKeyState(Keys.Down) <> 0 Then
        Car.Top += 6
    End If
End Sub

我需要添加或更改哪些内容?

0 个答案:

没有答案