In the Game1 class Game1 in any XNA project, methods Game1 , LoadContent , UnloadContent , etc. are UnloadContent .
Also, there are variables GraphicsDeviceManager and SpriteBatch declared. In order to add the ability to draw through another class, you need to transfer the same SpriteBatch as one of the method parameters.
Next, in the method of the class we need, we refer to spriteBatch :
public void Draw(SpriteBatch sprite) { sprite.Begin() ... } Is there a way to achieve an opportunity that would not require passing this argument as a parameter?