Advertisement
Guest User

Moving Pacman

a guest
Jan 13th, 2013
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.57 KB | None | 0 0
  1. Public Class Form1
  2.  
  3.     Private m_Actor As PacmanActor
  4.  
  5.     Private Sub btStart_Click(sender As Object, e As EventArgs) Handles btStart.Click
  6.         m_Actor = New PacmanActor(pnField)
  7.         m_Actor.StartUp(New Point(40, 30), New MovementRule())
  8.         tmrTimer.Enabled = True
  9.     End Sub
  10.  
  11.     Private Sub tmrTimer_Tick(sender As Object, e As EventArgs) Handles tmrTimer.Tick
  12.         m_Actor.Move()
  13.         If m_Actor.Done = True Then
  14.             tmrTimer.Enabled = False
  15.             MsgBox("Done!")
  16.             m_Actor.ShutDown()
  17.         End If
  18.     End Sub
  19. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement