+ }
+ player->get_physic().set_velocity_y(vy);
+ sound_manager->play(TRAMPOLINE_SOUND);
+ sprite->set_action("swinging", 1);
+ return FORCE_MOVE;
+ }
+ }
+ WalkingBadguy* walking_badguy = dynamic_cast<WalkingBadguy*> (&other);
+ //Trampoline also works for WalkingBadguy
+ if(walking_badguy) {
+ float vy = walking_badguy->get_velocity_y();
+ //walking_badguy is falling down on trampoline
+ if(hit.top && vy >= 0) {
+ vy = VY_INITIAL;
+ walking_badguy->set_velocity_y(vy);
+ sound_manager->play(TRAMPOLINE_SOUND);
+ sprite->set_action("swinging", 1);
+ return FORCE_MOVE;