Пример #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;
         }