XNA Sprite shooting a bullet, what is a good design for this?
-
I currently have a Player class that can LoadContent(),Render(GameTime) and other stuff like that, I also have a bullet class that is similar. Is there a good way to manage getting input , controlling and updating the player and bullets, and some place to fire them? So far i have player having a list of bullets, and a drawable game component that draws them if they are fired.
-
I currently have a Player class that can LoadContent(),Render(GameTime) and other stuff like that, I also have a bullet class that is similar. Is there a good way to manage getting input , controlling and updating the player and bullets, and some place to fire them? So far i have player having a list of bullets, and a drawable game component that draws them if they are fired.
Hope you will get all necessary information here. http://forums.xna.com/forums/t/43047.aspx
-
Hope you will get all necessary information here. http://forums.xna.com/forums/t/43047.aspx
Thanks for the reply, turns out that by the time i read this i had devised a working solution to handel this. Had a "PlayerManager","BulletManager" classes that related so that the player can fire and the bulletmanager will draw/updaete the bullets. Thanks again!