#include "sprite/sprite_manager.h"
#include "object_factory.h"
#include "lisp/lisp.h"
+#include "audio/sound_manager.h"
+#include "sector.h"
+#include "player.h"
InfoBlock::InfoBlock(const lisp::Lisp& lisp)
: Block(sprite_manager->create("infoblock"))
if(!lisp.get("message", message)) {
std::cerr << "No message in InfoBlock!\n";
}
+ ringing = true;
}
InfoBlock::~InfoBlock()
}
void
+InfoBlock::update(float elapsed_time)
+{
+ elapsed_time = 0;
+ if (ringing) sound_manager->play_sound("phone",get_pos(),Sector::current()->player->get_pos());
+}
+
+void
InfoBlock::hit(Player& )
{
GameSession::current()->display_info_box(message);
+ ringing = false;
start_bounce();
}