1
Graphics / Re: Vector affecting performance in game
« on: July 01, 2016, 11:21:29 am »
Thank lots, everything is fine now. I'm still too new at this
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
if (sf::Keyboard::isKeyPressed(sf::Keyboard::Space)) { // under while (window.isOpen()) {}
if (player.canShoot) {
player.shot();//timer related, not causing any issues
fireball.setStartPos(player.getPos());
fireball.start();//start animation, not causing issues
if (pList.size() == 3) { //max 3 projectiles, pList is the vector
pList.pop_front();
}
pList.push_back(fireball); //this causing issues
}
}