My overly long title says it all... I want to be able to access a variable from another class without creating a new object.
Currently the only way I know how to access another class's variable is:
Control control = new Control;
int dirtCount = control.dirtCount;
However, if I want to access this variable in my dirt object, I would have to create a new Control object for each one. This creates an endless cycle...
how can I access the variable without creating a new object?
(If you want to see the rest of my code, I can post it. I think that this part is the most relevant though :))
