- Learning C# 7 By Developing Games with Unity 2017(Third Edition)
- Micael DaGra?a Greg Lukosek
- 154字
- 2021-07-02 19:59:38
What is a method?
When we write a script, we are making lines of code that the computer is going to execute, one line at a time. As we write our code, there will be things that we want our game to execute more than once. For example, we can write a piece of code that adds two numbers. Suppose our game needs to add those two numbers a hundred different times during gameplay. So you'd say, "Wow! I have to write the same code a hundred times to add two numbers together? There has to be a better way."
Let a method take away your typing pain. You just have to write the code to add two numbers once and then give this chunk of code a name, such as AddTwoNumbers(). Now, every time your game needs to add two numbers, don't write the code over and over, just call the AddTwoNumbers() method.
- Designing Machine Learning Systems with Python
- Docker and Kubernetes for Java Developers
- 移動UI設計(微課版)
- Learning Real-time Processing with Spark Streaming
- Visual FoxPro程序設計教程(第3版)
- MATLAB圖像處理超級學習手冊
- Learning Laravel 4 Application Development
- Data Analysis with Stata
- Reactive Android Programming
- Linux Device Drivers Development
- Learning Apache Cassandra
- Processing創意編程指南
- Java EE Web應用開發基礎
- Anaconda數據科學實戰
- Offer來了:Java面試核心知識點精講(框架篇)