#include "badguy/stalactite.hpp"
+#include "audio/sound_manager.hpp"
#include "math/random_generator.hpp"
#include "object/bullet.hpp"
#include "object/player.hpp"
{
countMe = false;
set_colgroup_active(COLGROUP_TOUCHABLE);
+ SoundManager::current()->preload("sounds/cracking.wav");
+ SoundManager::current()->preload("sounds/sizzle.ogg");
+ SoundManager::current()->preload("sounds/icecrash.ogg");
}
void
&& player->get_bbox().p1.y < bbox.p2.y + SHAKE_RANGE_Y) {
timer.start(SHAKE_TIME);
state = STALACTITE_SHAKING;
+ SoundManager::current()->play("sounds/cracking.wav", get_pos());
}
}
} else if(state == STALACTITE_SHAKING) {
physic.set_velocity_y(0);
set_state(STATE_SQUISHED);
sprite->set_action("squished");
+ SoundManager::current()->play("sounds/icecrash.ogg", get_pos());
set_group(COLGROUP_MOVING_ONLY_STATIC);
run_dead_script();
}
timer.start(SHAKE_TIME);
state = STALACTITE_SHAKING;
bullet.remove_me();
+ if(bullet.get_type() == FIRE_BONUS)
+ SoundManager::current()->play("sounds/sizzle.ogg", get_pos());
+ SoundManager::current()->play("sounds/cracking.wav", get_pos());
}
return FORCE_MOVE;