Hello all,
I want to create a new bullet when I press 'space'. The easiest way to do it is to put all the logic in the Player class.
On the other hand, I must follow OOP concepts, which means that all entity creation should be handled in one place only and not scattered in different classes because later I may create something in my NPC class and then somewhere else and I will have object creation all over the place.
Now if I want to do everything in the World class, I need to pass a lot of different parameters like playerPos, playerDir, isProjectileLaunched, etc. to the World class, which doesn't look good.
How is this normally done? I want to have object creation in one place and also make the code pretty.
Thanks for reading. Any suggestions are appreciated.