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

Summary

We have made great strides in this chapter. Our new class organization will serve us well over the course of this book. We learned how to use protocols to enforce commonality across classes, encapsulated our game objects into distinct classes, and explored tiling textures over the width of the ground node. Finally, we cleaned out some of our previous learning code from GameScene and used the new class system to spawn all of our game objects.

We also applied the physics simulation to our game. We have only scratched the surface of the powerful physics system in SpriteKit—we will dive deeper into custom collision events in Chapter 7, Implementing Collision Events—but we have already gained quite a bit of functionality. We explored the three types of physics bodies and studied the various physics properties you can use to fine-tune the physical behavior of your game objects. Then, we put all of our hard work into practice by bumping our bees together and watching the results.

Next, we will try several control schemes and move our player around the game world. This is an exciting addition; our project will begin to feel like a true game in Chapter 4, Adding Controls.

主站蜘蛛池模板: 双辽市| 赤水市| 永顺县| 资中县| 英德市| 凤阳县| 呼玛县| 牙克石市| 逊克县| 商都县| 乌什县| 昌乐县| 伽师县| 建阳市| 历史| 平南县| 深州市| 泾阳县| 贵港市| 汉沽区| 长汀县| 揭阳市| 新河县| 顺昌县| 临澧县| 华阴市| 鸡泽县| 赣榆县| 汶川县| 西盟| 衢州市| 新龙县| 东莞市| 鄱阳县| 沈丘县| 钟祥市| 平舆县| 项城市| 洞口县| 若尔盖县| 桦川县|