Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

Passing the ContentManager to every class feels wrong. Is it?

$
0
0

@DefiniteGoose wrote:

Hey everyone,

I'm working on something simple to get me a better understanding of MonoGame and C# in general.

For my game, I have a Player, Projectile and Enemy class. They all have a Texture2D which I load using Game1's ContentManager. I pass this class through each class's constructor. This feels inefficient on the long run.

So my question is, is it truly inefficient? And if it is, what is an alternative way to, for instance, access Game1's ContentManager from other classes?

Posts: 7

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles