New answers tagged objects
For this specific problem, I suggest you create a global class in which you put those variables you need for other levels so you can always access them.
In my case, I went about a lot of this through composition (more precisely through the Strategy Pattern). I built an interface, and made LinearMovement and CircularMovement classes. My friend later added a ParabolicMovement class. Any of these can be provided to a game object at will; you can swap them out at any time. The result is that the function that ...
Keep Bullet functionality in the Bullet class. This just sounded like nails against a chalkboard to me: During the iteration, it checks what type of object it is, such as Bullet etc. Once it has checked this, it will calculate where the bullet should move to next based upon the Velocity property. Aaagh. D: It's not the base Entity class' ...
Top 50 recent answers are included