private void pictureBox2_Click(object sender, EventArgs e) { if (cliente == null) { return; } if (cliente.Conectado) { Invoke(new Action(() => { if (podeAtirar) { cliente.DarTiro(x2, y2); tiroX = x2; tiroY = y2; pictureBox2.Invalidate(); podeAtirar = false; } })); } }
private void TInimigo_OnTiroDado(int x, int y) { cliente.DarTiro(x, y); lblStatus.Text = "Vez do oponente"; }