当前位置: 动力学知识库 > 问答 > 编程问答 >

vb.net - Game different walking pictures?

问题描述:

Below is the code for when player moves, I want to make the picture of player moving up go when he moves, but right now it just blinks the up picture then goes back to down...

Any help would be awesome, thanks.

 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

分享给朋友:
您可能感兴趣的文章:
随机阅读: