public Form1() { InitializeComponent(); rainDrop = new RainDrop(randomRain); rainStorm.Add(rainDrop); livesLabel.Text = Convert.ToString(lives); }
private void timer1_Tick(object sender, EventArgs e) { scoreLabel.Text = Convert.ToString(runningScore); if (left) { player.moveLeft(); left = false; } if (right) { player.moveRight(); right = false; } if (timerCounter % 40 == 0) { rainDrop = new RainDrop(randomRain); rainStorm.Add(rainDrop); } //move raindrops down here foreach(RainDrop r in rainStorm) { r.falling(timerCounter); } //collision detection here collision(); timerCounter = timerCounter + 1; this.Invalidate(); }