Well, this is my last question for awhile, and probably the most basic
I’ve started making static references to my class called “instance.” I understand the concept completely in terms of referencing, but I just don’t understand one thing:
Pretend I have 2 classes… 1 is Weapon and 1 is Health.
In order to access one instance I would type Weapon.instance., and vice-versa for the health and I could use the variables throughout both of those scripts.
My main question, however… (trying to choose my words carefully)
In the Health class, would I have to set a private variable, “Health” equal to instance.health so that I could use a true instance between scripts, or does Health automatically equal instance.Health if called in another script?
I’ll try to think up some more elaboration…