Do poprawy centrowanie lasera i strzelanie w lewo i w prawo

This commit is contained in:
2024-12-20 23:38:37 +01:00
parent 0a5a26208a
commit c4c83382c3
8 changed files with 125 additions and 128 deletions

View File

@@ -21,8 +21,14 @@ Player* Player::getInstance(int x, int y, const sf::Texture& texture) {
}
void Player::loadTexture() {
bulletTexture.loadFromFile("../assets/img/bullets/bullet_pink.png");
rocketTexture.loadFromFile("../assets/img/rockets/Rocket_111.png");
try {
bulletTexture.loadFromFile("../assets/img/bullets/bullet_pink.png");
rocketTexture.loadFromFile("../assets/img/rockets/Rocket_111.png");
} catch (std::exception &e) {
std::cerr << "Failed to load textures: " << e.what() << std::endl;
exit(-500);
}
damageDealClock.restart();
originalColor = actorSprite.getColor();
}