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

Chapter 2. Creating a Collection Game

This chapter continues from the previous one by building a collection game with Unity. In this game, the player wanders an environment in first-person mode, searching for and collecting all the coins in a scene before a global timer expires. If all coins are collected before timer expiry, the game is won. However, if the timer expires before all coins are collected, the game is lost. The project created so far features a complete environment, with a floor, props, and water, and it also features a first-person controller along with a basic coin object, which looks correct in shape and form but still cannot be collected.

This chapter completes the project by creating a coin object to collect and adding a timer system to determine whether the total game time has elapsed. In essence, this chapter is about defining a system of logic and rules governing the game. To achieve this, we'll need to code in C# and so this chapter requires a basic understanding of programming. This book is about Unity and developing games with that engine. The basic of programming as a subject is, however, beyond the scope of this book. So, I'll assume that you already have a working knowledge of coding generally but have simply not coded in Unity before. Overall, this chapter will demonstrate the following topics:

  • Material creation
  • Prefabs
  • Coding with C#
  • Writing script files
  • Using particle systems
  • Building and compiling games
主站蜘蛛池模板: 吐鲁番市| 嘉兴市| 北安市| 木兰县| 邢台市| 额敏县| 安宁市| 棋牌| 临猗县| 连云港市| 太康县| 云阳县| 集安市| 贡山| 舞阳县| 金寨县| 时尚| 肥乡县| 吉林省| 安多县| 兴化市| 凤冈县| 滦平县| 阿巴嘎旗| 道孚县| 日喀则市| 类乌齐县| 彭州市| 乐亭县| 汉沽区| 色达县| 巨野县| 石家庄市| 卓资县| 景泰县| 黄平县| 扎鲁特旗| 岳池县| 威信县| 峨山| 郴州市|