Learning C# 7 By Developing Games with Unity 2017(Third Edition)
上QQ阅读APP看书,第一时间看更新

Summary

This chapter introduced the basic concepts of variables, methods, and the dot syntax. These building blocks are used to create scripts and classes. Understanding how these building blocks work is critical, so you don't feel you're not getting it.

We discovered that a variable name is a substitute for the value it stores, a method name is a substitute for a block of code, and when a script or class is attached to a GameObject, it becomes a component. The dot syntax is just like an address for locating GameObjects and components.

You also learned how to make decisions in code based on variable values. With these concepts under your belt, you can proceed to learn the details of the sentence structure, grammar, and syntax used to work with variables, methods, and the dot syntax. In the next chapter, we will cover the details of using variables.