#include "video/drawing_context.hpp"
#include "lisp/lisp.hpp"
#include "lisp/writer.hpp"
+#include "audio/sound_manager.hpp"
Door::Door(const lisp::Lisp& reader)
: state(CLOSED)
writer.write_string("sector", target_sector);
writer.write_string("spawnpoint", target_spawnpoint);
-
+ sound_manager->preload("sounds/door.wav");
writer.end_list("door");
}
if(sprite->animation_done()) {
state = OPEN;
sprite->set_action("open");
- stay_open_timer.start(1.0);
+ stay_open_timer.start(1.0);
}
break;
case OPEN:
case OPENING:
break;
case OPEN:
+sound_manager->play("sounds/door.wav");
{
// if door is open and was touched by a player, teleport the player
Player* player = dynamic_cast<Player*> (&other);