Jul-08-2019, 07:30 PM
Honestly, the autogui thing is fine as is, without classes. Classes/objects are most useful when you have some sort of data or information that's tied to functionality.
In the real world, your wallet would be a class. It keeps track of what's in it (how much money, cards, etc), and it knows what to do with those things (give money, charge card, etc).
In a video game, a class could be your character. You have stats that are different per-character (strength, agility, etc) as well as carried items or equipment, and the character itself knows how to move or attack.
In the real world, your wallet would be a class. It keeps track of what's in it (how much money, cards, etc), and it knows what to do with those things (give money, charge card, etc).
In a video game, a class could be your character. You have stats that are different per-character (strength, agility, etc) as well as carried items or equipment, and the character itself knows how to move or attack.