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

Understanding what a variable is and what it does

What is a variable? Technically, it's a tiny section of your computer's memory that will hold any information that you put there. While a game is running, it keeps track of where the information is stored, the value kept there, and the type of that value. However, for this chapter, all you need to know is how a variable works. It's very simple.

What's usually in a mailbox, besides air? Well usually there's nothing, but occasionally there is something in it. Sometimes, there are letters, bills, a spider, and so on. The point is that what is in a mailbox can vary. Therefore, let's call each mailbox a variable.

In the game development world, some simple examples of variables might be:

  • playerName
  • playerScore
  • highestScore
主站蜘蛛池模板: 利川市| 西乌| 乐亭县| 竹溪县| 招远市| 上林县| 泸定县| 承德市| 唐海县| 晴隆县| 湘乡市| 黄冈市| 会昌县| 深水埗区| 水富县| 剑川县| 雅江县| 泸溪县| 浠水县| 鱼台县| 青冈县| 玉龙| 枣阳市| 辛集市| 星子县| 峨眉山市| 桐乡市| 兰州市| 辉南县| 垫江县| 双辽市| 吉安县| 光山县| 景泰县| 册亨县| 新绛县| 南汇区| 莱阳市| 罗甸县| 河曲县| 奈曼旗|