{
if(tumbling)
{
- sprite.rotate(rotation/FPS);
+ sprite.rotate(-1*std::copysign(1, direction.x)*rotation/FPS);
tumble_degrees += rotation/FPS;
if (tumble_degrees >= 360)
{
void Player::collision(Object& other)
{
-
+ move(false);
}
if(tumbling)
{
- sprite.rotate(rotation/FPS);
+ sprite.rotate(-1*std::copysign(1, direction.x)*rotation/FPS);
tumble_degrees += rotation/FPS;
if (tumble_degrees >= 360)
{
direction.x /= sqrt(len);
direction.y /= sqrt(len);
}
- std::cout << "x: " << direction.x << "Y: " << direction.y << std::endl;
}
}
}