Atari Combat: Tank vb 2010 (16 / 18 steg)
Steg 16: Koden: blå tank rörelsen
för blå tanken jag auktoriserat inte den samma utom i olika timers så formulär2 design Välj timers 13-16 och pressa gå in Lägg till följande kod till varje:
Private Sub Timer13_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) hanterar Timer13.Tick ' upp
tank2. Topp-= 5
tank2. Bild = bt1. Bild
End Sub
Private Sub Timer14_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) hanterar Timer14.Tick
"ner
tank2. Topp + = 5
tank2. Bild = bt3. Bild
End Sub
Private Sub Timer15_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) hanterar Timer15.Tick "vänster
tank2. Vänstra-= 5
tank2. Bild = bt2. Bild
End Sub
Private Sub Timer16_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) hanterar Timer16.Tick "rätt
tank2. Vänstra += 5
tank2. Bild = bt4. Bild
End Sub