then i have an actionscene which holds all my players , weapons,enemies etc

i have created a camera class and then i have created a new camera within my player class (i have also tried to create it within the actual actionscene) but i think its all ok apart from when it comes to the draw method when i have to include the camera within the spritebatch.begin(.............) but i am getting an error because obviously i have an spritebatch.begin in the main class which holds the different scenes.... so i tried writing a new spritebatch.begin in the player/actionscene but getting the error obviously i cant begin a new one until the end has been called

can anyone help me with this problem. if needed to see any code i will paste it in if needed. i just wondered if this is a common problem people get?

i cant see how to create the new camera in the main heliClass because i need to pass the character values which are created within the player/action class?

Firstly, yes you can only have one spritebatch running at a time and that's usually fine.

I'm assuming your camera is or contains a matrix which you intend to pass into .Begin. Now, ideally, your camera object should be accessible from the highest level it's needed - in this case, the spritebatch.Begin call that would be effected by the camera (so not for any UI components). Without seeing the code it's more complicated to guess at what you're doing but I'll try and provide a few options for you.

A. remove the begin call from the main class and have the begin called in the scene. This makes sense if the scene manages drawing all the objects for the scene. Alternatively, End the spritebatch call in the main class before the draw is called on the scene if main drawing something that won't be overwritten by the scene, or begin it afterwards if it is drawing some UI components that would be overwritten.

B. put your camera instance in the main class and pass it around by parameter or property to the child objects that need it. This method is less clean, but it is a viable solution.

If neither of those work out feel free to include your problematic code in a post or via pastebin and we can try an help

Basic Flying Rules:Try to stay in the middle of the air. Do not go near the edges of it. The edges of the air can be recognized by the appearance of ground, buildings, sea, trees and interstellar space. It is much more difficult to fly there.

ahh yes that is fine , at the moment i have took a step back and decided to clean the coding up of what i have so far ie, create a spritemanager to make it easier for others to read my code and help me learn more about making a spritemanager, but soon as i am sorted with that i will be back to look at the camera problem im glad its not a major problem and seems to be easy enough to sort out

ok this is annoying me now i decided because the only enemies for now will be same enemiy texture in list its pointless making a complex sprite manager when its only a 1 player simple game, so back to the camera problem

if i remove the sprite.begin and end from the main class none of the menus are drawn, i have tried a few different ways trying to end before the next begin and having no luck , here is the MAIN class code