Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click
- If btnStart.Text = "Start" Then
- Timer1.Enabled = True
- btnStart.Text = "Koniec"
- Else
- btnStart.Text = "Start"
- Timer1.Enabled = False
- Timer2.Enabled = False
- samolot.Left = 43
- samolot.Top = 136
- End If
- End Sub
- Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
- If samolot.Top < liniamiejsceladowania.Y2 - 15 And samolot.Left < liniamiejsceladowania.X2 _
- Then
- samolot.Top = samolot.Top + 2
- samolot.Left = samolot.Left + 3
- Else
- Timer1.Enabled = False
- Timer2.Enabled = True
- End If
- End Sub
- Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
- If samolot.Left < liniamiejscezatrzymania.X1 Then
- samolot.Left = samolot.Left + 2
- Else
- Timer2.Enabled = False
- End If
- End Sub
- End Class
Add Comment
Please, Sign In to add comment