Public Class Bloon Inherits PictureBox Dim l As Integer Dim s As Integer Dim m As Integer Dim d As Boolean Dim c As Integer Dim WithEvents t As Timer = New Timer Public Sub New() Me.Size = New Size(24, 24) Me.Location = New Point(70, 0) Me.Image = Image.FromFile("bloonblue.png") Me.SizeMode = PictureBoxSizeMode.StretchImage Me.Time = New Timer() Me.Time.Interval = 10 Me.Time.Start() End Sub Public Property Counter As Integer Get Return c End Get Set(ByVal value As Integer) c = value End Set End Property Public Property Time As Timer Get Return t End Get Set(ByVal value As Timer) t = value End Set End Property Public Property layers As Integer Get Return l End Get Set(ByVal value As Integer) l = value End Set End Property Public Property speed As Integer Get Return s End Get Set(ByVal value As Integer) s = value End Set End Property Public Property money As Integer Get Return m End Get Set(ByVal value As Integer) m = value End Set End Property Public Property dead As Boolean Get Return d End Get Set(ByVal value As Boolean) d = value End Set End Property Public Sub moveBloon(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles t.Tick c = c + 1 If c < 26 Then Me.Location = New Point(Me.Location.X, Me.Location.Y + 4) ElseIf c < 50 Then Me.Location = New Point(Me.Location.X + 4, Me.Location.Y) ElseIf c < 65 Then Me.Location = New Point(Me.Location.X, Me.Location.Y + 4) ElseIf c < 89 Then Me.Location = New Point(Me.Location.X - 4, Me.Location.Y) ElseIf c < 138 Then Me.Location = New Point(Me.Location.X, Me.Location.Y + 4) ElseIf c < 178 Then Me.Location = New Point(Me.Location.X + 4, Me.Location.Y) ElseIf c < 259 Then Me.Location = New Point(Me.Location.X, Me.Location.Y - 4) ElseIf c < 306 Then Me.Location = New Point(Me.Location.X + 4, Me.Location.Y) ElseIf c < 322 Then Me.Location = New Point(Me.Location.X, Me.Location.Y + 4) ElseIf c < 346 Then Me.Location = New Point(Me.Location.X - 4, Me.Location.Y) ElseIf c < 362 Then Me.Location = New Point(Me.Location.X, Me.Location.Y + 4) ElseIf c < 378 Then Me.Location = New Point(Me.Location.X + 4, Me.Location.Y) ElseIf c < 410 Then Me.Location = New Point(Me.Location.X, Me.Location.Y + 4) ElseIf c < 426 Then Me.Location = New Point(Me.Location.X - 4, Me.Location.Y) ElseIf c < 450 Then Me.Location = New Point(Me.Location.X, Me.Location.Y + 4) ElseIf c < 474 Then Me.Location = New Point(Me.Location.X + 4, Me.Location.Y) ElseIf c < 500 Then Me.Location = New Point(Me.Location.X, Me.Location.Y + 4) Else t.Stop() End If End Sub End Class