Game Development Reference
In-Depth Information
Figure 14.1
A Visual Studio simple project example.
Understanding Variables
A variable is a value that can change. This can be a text value or a numeric
value. If you think about any type of situation in a game, you can probably
come up with some values that change in the course of running it. Some
examples are:
n Currency : A player earns more money and then spends it.
n Time : The time in a game world is ever changing.
n Items in an inventory : Players will have a changing number of items in
their inventories at any point.
n Health : The amount of health a player has.
Score : The current score that the player has achieved in a game.
n
Search WWH ::




Custom Search