Guten Abend, ich habe ein kleines Problem, also ich sitze gerade an einem kleinen Minispiel und musste wegen einem Fehler alles nochmal neu machen und seitdem ich meinen neuen Codes benutze funktioniert er nicht mehr richtig:
Es könnte sein dass, ich vielleicht einen kleinen Fehler gemacht habe aber ich bin dennoch zu blöd ihn zu finden.
Danke im vorraus
LG
VB.NET-Quellcode
- Private Sub Level_1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
- If e.KeyCode = Keys.A Then
- Dim x As Integer = Me.Player.Location.X, y As Integer = Me.Player.Location.Y
- Player.BackgroundImage = Image.FromFile("\Textures\32x32\Player\Left_1.png")
- x -= 5
- y += 0
- Player.Location = New Point(x, y)
- End If
- If e.KeyCode = Keys.D Then
- Dim x As Integer = Me.Player.Location.X, y As Integer = Me.Player.Location.Y
- Player.BackgroundImage = Image.FromFile("\Textures\32x32\Player\Right_1.png")
- x += 5
- y += 0
- Player.Location = New Point(x, y)
- End If
- If e.KeyCode = Keys.S Then
- Dim x As Integer = Me.Player.Location.X, y As Integer = Me.Player.Location.Y
- Player.BackgroundImage = Image.FromFile("\Textures\32x32\Player\Front_1.png")
- x -= 0
- y += 5
- Player.Location = New Point(x, y)
- End If
- If e.KeyCode = Keys.W Then
- Dim x As Integer = Me.Player.Location.X, y As Integer = Me.Player.Location.Y
- Player.BackgroundImage = Image.FromFile("\Textures\32x32\Player\Back_1.png")
- x -= 0
- y -= 5
- Player.Location = New Point(x, y)
- End If
Es könnte sein dass, ich vielleicht einen kleinen Fehler gemacht habe aber ich bin dennoch zu blöd ihn zu finden.
Danke im vorraus
LG