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

Summary

In this chapter, we learned that a method definition ends with a code block between two curly braces, not with a semicolon. The parentheses are part of a method's name. We also learned how to call a method into action, how to use data returned from a method, and that Unity calls some methods automatically, such as the Start() and Update() methods, when the script inherits from the MonoBehaviour class.

You now know the two major building blocks of scripting, variables and methods. From now on, everything else you do will just be making use of variables and methods. Now that you understand these two building blocks, you are ready for the next chapter that deals with making decisions in your code.

主站蜘蛛池模板: 温宿县| 五常市| 华阴市| 保亭| 巫溪县| 平舆县| 柯坪县| 肥城市| 克拉玛依市| 阿尔山市| 辛集市| 邛崃市| 木里| 军事| 乐安县| 康乐县| 商都县| 麻阳| 黑龙江省| 临洮县| 达拉特旗| 浦县| 吴堡县| 万全县| 屯留县| 慈利县| 陆河县| 仲巴县| 大理市| 东乡| 同德县| 丹凤县| 伊宁县| 江西省| 汪清县| 望都县| 孙吴县| 阳高县| 恩平市| 涡阳县| 大丰市|