Name: Anonymous 2012-03-26 21:14
Hey guys, just a quick question here...
Current making a game in C# (herp derp, yeah... it's a requirement for the course I'm studying) and I've got what I want working so far.
But as for the OOP, I'd just like something clarified. I've made a class for a tiled map, but I also have quite a few variables/objects in the main game class that I'd like to access from the map class. At the moment, I've just made all of these public and it works fine. But it seems to me like this is a bad way of doing it... Just doesn't feel very correct.
I was thinking of making a new class that just contains everything I need (kind of like an interface between the two classes) but that also seems kinda stupid.
So yeah, if anyone understands what I'm asking... What exactly is it that I should be doing here?
Current making a game in C# (herp derp, yeah... it's a requirement for the course I'm studying) and I've got what I want working so far.
But as for the OOP, I'd just like something clarified. I've made a class for a tiled map, but I also have quite a few variables/objects in the main game class that I'd like to access from the map class. At the moment, I've just made all of these public and it works fine. But it seems to me like this is a bad way of doing it... Just doesn't feel very correct.
I was thinking of making a new class that just contains everything I need (kind of like an interface between the two classes) but that also seems kinda stupid.
So yeah, if anyone understands what I'm asking... What exactly is it that I should be doing here?