Hi,
Im building a game and when i create all in the same class, everything is working fine, and after it works, i separate it into classes and refactored the code.
After refactor, my player class have a texture attribute that store the texture and the engine draw the animated sprite.
So the pseudo-code is:
Player
- AnimatedSprite *sprite
- sf::Texture *texture
Engine
- player->update(sf::Time delta)
- player->draw() or window->draw(*player->sprite) // both code i get the same problem
Can anyone try help me? I think that is a small problem, because it is moving correctly and everything is working, only the rendering problem while player draw.
Screenshot is attached with result.
Thanks.
[attachment deleted by admin]