| George 的个人资料George's XNA Programming日志列表网络 | 帮助 |
|
|
3月5日 XNA Slots - Part 2Here comes an updated version of XNASlots. As you can see from the screen-shot, the game now displays stake, winning and balance information. It is now possible to specify stake and selected lines and when the slot is spun, correct amount is deducted from the user balance. You can hit 1, 3, 5, 7, 9 keys on the keyboard to select lines and the Spacebar is used to increase bet. Maximum bet is $10. This is defined in a new constant named MAX_STAKE. I use Nuclex fonts to display texts in the game. You can find more information about Nuclex fonts in one of my previous posts. There are a couple of cosmetic changes to the code. For example, the keyboard input is moved to a new method UpdateInput. We now deduct user balance after each spin and the Spin method has been amended to reflect this as well. SelectLines and IncreaseStake are two new functions. As you may guess from the names, the former method select lines and the later increases user stake. The Draw method has been updated to draw texts on the screen. The LoadGraphicsContent has been changed to load a font. The background image has been changed as well. I decided to put the stake, winning, balance panel on the main background. In the next part, we will add the winning table and more cool stuff. 评论 (3)
引用通告此日志的引用通告 URL 是: http://xnadev.spaces.live.com/blog/cns!8B6E83562E8DE240!148.trak 引用此项的网络日志
|
|
|