private void pcb_Ball_Click(object sender, EventArgs e) { if (Ball_Movement_Timer.Enabled == false) { Ball_Movement_Timer.Enabled = true; Ball_Movement_Timer.Start(); } }
private void pcb_Start_Click(object sender, EventArgs e) { pnl_Impo.Enabled = false; Ball_Movement_Timer.Start(); if (EE1_2) { lbl_Vite.Text = "Inf"; vite = 100; } else { vite = 4; lbl_Vite.Text = vite.ToString(); } pnl_Home.Enabled = true; }
private void btn_Return_KeyPress(object sender, KeyPressEventArgs e) { switch (Char.ToLower((char)e.KeyChar)) { case 'e': txt_EasterEgg.Visible = true; break; case (char)Keys.Return: if (Ball_Movement_Timer.Enabled == false) { Ball_Movement_Timer.Enabled = true; Ball_Movement_Timer.Start(); } break; default: break; } }
private void Ball_Movement_Timer_Tick(object sender, EventArgs e) { rtn_Barra.Location = pcb_Paddle.Location; if (P1.MovimentoEGestione(ref rtn_Barra, ref Brick, ref Rect, ref VittoriaCont, ref punteggio) == true) { Ball_Movement_Timer.Stop(); Ball_Movement_Timer.Enabled = false; MessageBox.Show("Hai perso una vita Idiota"); vite--; lbl_Vite.Text = vite.ToString(); CheckVite(); pcb_Ball.Location = new Point(160, 360); punteggio /= 2; MessageBox.Show("Clicca sulla palla per continuare (Non premere 'e'"); } else { lbl_Point.Text = punteggio.ToString(); } if (VittoriaCont == 35) { Ball_Movement_Timer.Stop(); if (EE1_1 == true) { //EE1.Stop(); if (!Serial) { MessageBox.Show("Vuoi vincere? Compra il DLC presso steam"); } else { Stream S1 = Properties.Resources.WinTheme; SoundPlayer SP1 = new SoundPlayer(S1); SP1.Play(); MessageBox.Show("Complimenti, hai vinto la partita"); SP1.Stop(); Ogg.AttivaNewGame(ref Brick, ref pcb_Ball, ref VittoriaCont, ref pnl_Home, ref pcb_Start, ref punteggio, ref lbl_Point, ref pcb_Paddle); pcb_Start.Enabled = true; } } } }
private void frmGame_KeyPress(object sender, KeyPressEventArgs e) { switch (Char.ToLower((char)e.KeyChar)) { case 'e': txt_EasterEgg.Visible = true; break; case (char)Keys.Return: if (Ball_Movement_Timer.Enabled == false) { Ball_Movement_Timer.Enabled = true; Ball_Movement_Timer.Start(); } break; case 'a': if (Muovimento == false) { x = pcb_Paddle.Location.X; x -= 10; y = pcb_Paddle.Location.Y; this.pcb_Paddle.Location = new Point(x, y); } break; case 'd': if (Muovimento == false) { x = pcb_Paddle.Location.X; x -= 10; y = pcb_Paddle.Location.Y; this.pcb_Paddle.Location = new Point(x, y); } break; default: break; } }