This commit is contained in:
2024-11-29 14:53:58 +01:00
parent d20fb3043b
commit 2f6c98f4be
4 changed files with 3 additions and 5 deletions

View File

@@ -18,7 +18,7 @@ void Player::shoot() {
void Player::alternate_shoot() {
auto now = std::chrono::steady_clock::now();
if (std::chrono::duration_cast<std::chrono::milliseconds>(now - lastShotTime).count() >= firerate) {
bullets.emplace_back(position.x, position.y).getSprite().scale(1.5f, 1.5f);
rightBullets.emplace_back(position.x, position.y).getSprite().scale(1.5f, 1.5f);
lastShotTime = now;
}
}