示例#1
0
 public void changeControlPosition(object sender, PacEventArgs e)
 {
     Invoke((MethodInvoker) delegate()
     {
         e.cnt.Location = new Point(e.x, e.y);
     });
 }
示例#2
0
 public void changeCoinVisibility(object sender, PacEventArgs e)
 {
     Invoke((MethodInvoker) delegate()
     {
         e.cnt.Visible = false;
     });
 }
示例#3
0
 public void changePacmanVisibility(object sender, PacEventArgs e)
 {
     Invoke((MethodInvoker) delegate()
     {
         this.Controls.Find("pacman" + e.Pacman, true)[0].Visible = true;
     });
 }
示例#4
0
 public void launch_mainloop(object sender, PacEventArgs e)
 {
     Invoke((MethodInvoker) delegate()
     {
         ThreadStart ts2 = new ThreadStart(main_loop);
         mainloop        = new Thread(ts2);
         mainloop.Start();
     });
 }
示例#5
0
 public void changePacDir(object sender, PacEventArgs e)
 {
     Invoke((MethodInvoker) delegate()
     {
         PictureBox pac   = (PictureBox)e.cnt;
         String direction = e.data;
         if (direction == "LEFT")
         {
             pac.Image = Properties.Resources.Left;
         }
         else if (direction == "UP")
         {
             pac.Image = Properties.Resources.Up;
         }
         else if (direction == "RIGHT")
         {
             pac.Image = Properties.Resources.Right;
         }
         else /* player.faceDirection == "DOWN" */ pac {
             .Image = Properties.Resources.down;
         }