Код: Выделить всё
if (Keyboard::isKeyPressed(Keyboard::Space) && !shoot) {
shoot = true;
}
// Calculate bomb radians
bombRadians = ((2.f * PI / 360.f) * bomb.getRotation());
x = bombSpeed * sin(bombRadians);
y = bombSpeed * -cos(bombRadians);
if (shoot) {
bomb.move(x, y);
}
// Timer
frames++;
if (frames == 6) {
timer += 0.1f * (60 / framerate);
frames = 0;
}
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79052265/is-there-a-way-to-scale-my-speed-variable-with-the-screen-resolution[/url]