public void changeControlPosition(object sender, PacEventArgs e) { Invoke((MethodInvoker) delegate() { e.cnt.Location = new Point(e.x, e.y); }); }
public void changeCoinVisibility(object sender, PacEventArgs e) { Invoke((MethodInvoker) delegate() { e.cnt.Visible = false; }); }
public void changePacmanVisibility(object sender, PacEventArgs e) { Invoke((MethodInvoker) delegate() { this.Controls.Find("pacman" + e.Pacman, true)[0].Visible = true; }); }
public void launch_mainloop(object sender, PacEventArgs e) { Invoke((MethodInvoker) delegate() { ThreadStart ts2 = new ThreadStart(main_loop); mainloop = new Thread(ts2); mainloop.Start(); }); }
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; }