ashish2199 / Aidos

A beginner friendly project with aim of creating our own version of Bomberman.
GNU General Public License v3.0
41 stars 27 forks source link

Removed dependency on Player from Renderer. #29

Closed ItsStolas closed 6 years ago

ItsStolas commented 6 years ago

Removed dependency on Player from Renderer.

Renderer now relies on the position of the SPRITE. So, you can render any object that has a sprite attached to it through the renderer. You just need to make sure in the draw() you call currentSprite.setPosition(x,y), to make sure the sprite follows the object around.

This creates a better seperation of classes, I think, at least. Let me know what you guys think.