对于测试程序,我们只简单地让键侦听器根据按下的是左还是右shift键按向上或向下的方向循环,如清单5所示。
For the test program, we'll simply have a key listener loop up or down based on whether the left or right shift key is pressed, as shown in Listing 5.
按向上的移动键向面对的方向游去。
Press movement key up to swing in the direction you're facing.
球旋转指示器启动:按上键让他停止在需要的方向上。
The ball rotation indicator is activated: press upwards to stop it on the required direction.
So in a moment you're going to go ahead and hit the spacebar and then as things fall from the screen when they line up with the left arrow, hit the left arrow with a different arrow, hit that arrow and see how good a score you can get.
一会儿你走到前面,敲一下空格键,当屏幕上面的东西从左边往下掉的时候,你就敲一下键盘上的左键,是哪个方向,敲对应的方向键就可以了,我们来看看你能得多少分。
应用推荐