C
Crirus
I have this classes tree
GameManager 1 object
Game Multiple objects
Map 1 object
Player Multiple objects
Squads Multiple objects
Units Multiple objects
Now each Squad or Units have to know about data on it's Map
Say I have Game1 and Game 2
Game2 have different map than Game1
any unit1_1 of branch Game1 need to know about Map1
any unit1_2 of branch Game2 need to know about Map2
How to accomplish that?
Should I pass to Unit1_1 the Game1 instance?
I whould like the Map1 shared to all Game1 children objects somehow..the
same with Map2 and Game2
Right now I keep passing the map arround each time I need it way down to a
unit that move or do stuffs
GameManager 1 object
Game Multiple objects
Map 1 object
Player Multiple objects
Squads Multiple objects
Units Multiple objects
Now each Squad or Units have to know about data on it's Map
Say I have Game1 and Game 2
Game2 have different map than Game1
any unit1_1 of branch Game1 need to know about Map1
any unit1_2 of branch Game2 need to know about Map2
How to accomplish that?
Should I pass to Unit1_1 the Game1 instance?
I whould like the Map1 shared to all Game1 children objects somehow..the
same with Map2 and Game2
Right now I keep passing the map arround each time I need it way down to a
unit that move or do stuffs