上QQ阅读APP看书,第一时间看更新
You just finished your first XNA game, that's what!
Granted it is not exactly the next blockbuster, but at only 33 lines of code, it implements a simple game mechanic, user input, score tracking and display, and clock-based timing. Not bad for a few minutes work.
As simple as it is, here are a couple of enhancements you could make to SquareChase:
- Vary the size of the square, making it smaller every few times the player catches one, until you reach a size of 10 pixels.
- Start off with a higher setting for
TimePerSquare
and decrease it a little each time the player catches a square. (Hint: You'll need to remove theconst
declaration in front ofTimePerSquare
if you wish to change it at runtime).