For example: the class I made that sets up the tiles for each of the “levels” or “sections” of the game. I might need to access certain properties or variables from that class from another class. how could i go about doing this? I am sure that this is a very noobish question, but i would appreciate your help.
So for a more direct example, i am making a tile based game and the variable: tileLength:int = 50; is a key point in making the game, as many attributes of the game will fall to that rule (being that the tiles are 50x50 pixels wide). Many classes will need to access it, but i find that i always get an error when trying to access any variable from either the main game or any other class besides the class trying to access said variable. For example, say i have the variable blah, in the class blahClass. From a separate class, durkClass, i want to use a variable or call a function from the **blahClass. **how would i go about his?
Hope i was clear in what i was asking. I appreciate your help, thank you in advance.