官术网_书友最值得收藏!

FAQ

Q) Why do we set the bee to inactive when it gets to -100? Why not just zero because zero is the left-hand side of the window?

A) The bee graphic is 60 pixels wide and its origin is at the top left pixel. So when the bee is drawn with its origin at x equals zero, the entire bee graphic is still on screen for the player to see. By waiting until it is at -100, we can be sure it is definitely out of the player's view.

Q) How do I know how fast my game loop is?

A) To measure this we will need to learn a few more things. We will add the ability to measure and display the current frame rate in Chapter 5: Collisions, Sound, and End Conditions - Making the Game Playable.

主站蜘蛛池模板: 福建省| 玛多县| 会理县| 开远市| 华安县| 新绛县| 高州市| 洛浦县| 来安县| 萍乡市| 永平县| 蛟河市| 绥中县| 永宁县| 宁国市| 陆河县| 门源| 韶山市| 九龙坡区| 江城| 双江| 元氏县| 华安县| 惠安县| 铜陵市| 柯坪县| 和田市| 井研县| 华宁县| 苗栗市| 涿鹿县| 陆良县| 鄢陵县| 绥芬河市| 汨罗市| 潜山县| 锡林郭勒盟| 富民县| 普兰县| 蒙城县| 万安县|