physic.set_velocity_y(JUMPSPEED);
// TODO create a nice sound for this...
//sound_manager->play("sounds/skid.wav");
physic.set_velocity_y(JUMPSPEED);
// TODO create a nice sound for this...
//sound_manager->play("sounds/skid.wav");
Player* player = this->get_nearest_player();
if (player)
{
dir = (player->get_pos().x > get_pos().x) ? RIGHT : LEFT;
}
Player* player = this->get_nearest_player();
if (player)
{
dir = (player->get_pos().x > get_pos().x) ? RIGHT : LEFT;
}
if ( get_pos().y < (pos_groundhit.y - JUMPY_MID_TOLERANCE ) )
sprite->set_action(dir == LEFT ? "left-up" : "right-up");
else if ( get_pos().y >= (pos_groundhit.y - JUMPY_MID_TOLERANCE) &&
if ( get_pos().y < (pos_groundhit.y - JUMPY_MID_TOLERANCE ) )
sprite->set_action(dir == LEFT ? "left-up" : "right-up");
else if ( get_pos().y >= (pos_groundhit.y - JUMPY_MID_TOLERANCE) &&