Object/self variables

If you have a variable that applies individually to each object, make it an object variable. For example, if you have a game where each character has its own health, make the ‘health’ variable an object variable so that each object has its own separate health value. 

"Self" refers to the object that is currently running the code.

Still need help? Contact Us Contact Us