Código:
Imports System
Imports System.Timers
Public Class Timerclase
Private Shared aTimer As New System.Windows.Forms.Timer()
Shared villa1 As Villano
Shared villa2 As Villano
Shared villa3 As Villano
Shared heroe As Heroe
Private Shared Sub timermovervillanos(ByVal myObject As Object, _
ByVal myEventsArgs As EventArgs)
If heroe.GetMuerto = False Then
If villa1.GetMuerto = False Then
villa1.move()
End If
If villa2.GetMuerto = False Then
villa2.move()
End If
If villa3.GetMuerto = False Then
villa3.move()
End If
End If
main()
End Sub
Public Shared Sub main()
AddHandler aTimer.Tick, AddressOf timermovervillanos
aTimer.Enabled = True
aTimer.Interval = 500
aTimer.Start()
End Sub
End Class