I work on a little project, and in the past, I used SpriteManager : DrawableGameComponent
as my SpriteManager
class.
I have been told that DrawableGameComponent
is not so recommended to use, so I decided to make my own custom methods in a new class called SpriteManagerGeneral
. Now I try to acces that class via Game
. In the past I used this in Game
:
spriteManager = new SpriteManager(this);
Components.Add(spriteManager);
But now I can't do this with SpriteManagerGeneral
because it's not a GameComponent
.
Do I just change my class (and edit my methods) to SpriteManagerGeneral : GameComponent
or is there another way (that is better than GameComponent
) to do this?
NOTE: I'm a beginner in programming.
NOTE2: Yes I know why DrawableGameComponent
is not so recommended.
SpriteManagerGeneral
do and how are other parts of your application interacting with it? \$\endgroup\$SpriteManagerGeneral
does exactly the same BUT it has another name because I keep the other Spritemanager class if something goes wrong. My class is used to handle all the sprites. \$\endgroup\$GameComponent
? \$\endgroup\$SpriteManager
class (wich is not derived from anything) inGame
. Sorry for the confusion. \$\endgroup\$