posted 17 years ago
Hi,
It makes me feel inferior to ask this, but I have a question about objects in classes. Well I am working with a canvas, and I decided that I want to make a seperate object to have contructors that keeps track of screenwidth ect.
like:
i constructed it in WorldGenerator (which contains my main class)
I can refer to the setting object anywhere i want in the world generator class. BUT i cant refer to the setting object in a different TileMap class, because it cant recognize symbol because i didnt construct the object in the TileMap class:
So i guess i pretty much messed up my design...
i also tryed using things like static and public, but it feels "wrong" and, it doesnt work anyway. I even tryed to extend the WorldGenerator class, but it causes compile errors with the paramaters in the TileMap constructors.
[ December 06, 2006: Message edited by: Keenan Staffieri ]