游戏不同的步行图片?

时间:2014-01-08 05:13:54

标签: vb.net

以下是玩家移动时的代码,我想让玩家在移动时向上移动的图片,但是现在它只是眨了眨眼睛然后又回到了下方......

任何帮助都会很棒,谢谢。

    Private Sub walkup_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles walkup.Tick
    If moveup.Visible = False Then
        'moveup.Show()
        moveup.Visible = True
        movedown.Hide()
        Me.moveup.Location = New Point(Me.movedown.Location.X, Me.movedown.Location.Y)
    End If

    If Me.moveup.Location.Y > 12 Then
        Me.moveup.Location = New Point(Me.moveup.Location.X, Me.moveup.Location.Y - 1)
    End If
    Static moveCount As Integer = 1
    moveCount += 1
    If moveCount = 10 Then
        moveCount = 1
        moveup.Hide()
        movedown.Show()
        walkup.Stop()
    End If
End Sub

0 个答案:

没有答案