private void timer1_Tick(object sender, EventArgs e) { using (currentContext = BufferedGraphicsManager.Current) using (myBuffer = currentContext.Allocate(this.CreateGraphics(), this.DisplayRectangle)) { game.draw(myBuffer); myBuffer.Render(this.CreateGraphics()); } cont++; if (!pasa) { game.Enemymove(); pasa = true; } if (cont == 2500) { cont = 0; game.reset(myBuffer); } }