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

Summary

In this chapter, we learned that a variable is a named storage location in memory in which we can keep values of a specific type. The types include int, float, double, bool, String, and char.

We can declare and initialize all of the variables we need to store the data for our game. Once we have our variables, we can manipulate them using the arithmetic and assignment operators, as well as use them in tests with the logical operators. Used in conjunction with the if and else keywords, we can branch our code depending on the current situation in the game.

Using all of this new knowledge, we animated some clouds and a bee. In the next chapter, we will use these skills some more to add a Heads Up Display (HUD) and add more input options for the player, as well as represent time visually using a time-bar.

主站蜘蛛池模板: 东台市| 措美县| 通河县| 荥阳市| 遵化市| 河池市| 松桃| 新竹市| 寿光市| 鲁山县| 荥经县| 侯马市| 永定县| 都昌县| 诏安县| 崇阳县| 长宁县| 昭苏县| 延长县| 呼和浩特市| 济南市| 新泰市| 田东县| 如皋市| 台中市| 丽水市| 科技| 弥渡县| 上思县| 阳高县| 理塘县| 依兰县| 蕉岭县| 温宿县| 贵港市| 镇坪县| 沧源| 赤城县| 讷河市| 繁昌县| 红原县|