void Dt_Tick(object sender, EventArgs e) { player.Move(ActualHeight); foreach (Wall o in walls) { o.Move(ActualWidth, ActualHeight); if (player.Collide(o)) { point++; } } InvalidateVisual(); }