private void Lasertimer_Tick(object sender, EventArgs e) { timerlaser--; if (timerlaser == 0) { instantalaser = false; Lasertimer.Stop(); } }
private void keyisdown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.A) { stanga = true; } if (e.KeyCode == Keys.D) { dreapta = true; } if (e.KeyCode == Keys.Space && !apasat) { if (startjoc == true && instantalaser == false) { armalaser(); instantalaser = true; timerlaser = 1; Lasertimer.Start(); } } }