private void updateGameThings() { tess.Forward(tessSpeed); for (int i = gameThings.Count - 1; i >= 0; i--) { MovingFootprint p = gameThings[i]; p.Update(); if (p.getTimeToLive() <= 0) { gameThings.Remove(p); tess.Footprints.Remove(p.myFp); } } }
private void Window_KeyDown(object sender, KeyEventArgs e) { switch (e.Key) { case Key.Left: tess.Left(15); break; case Key.Right: tess.Right(15); break; case Key.Space: Footprint fp = tess.Stamp(); MovingFootprint mfp = new MovingFootprint(fp); gameThings.Add(mfp); break; } }