#include "object_factory.hpp"
#include "lisp/lisp.hpp"
#include "sector.hpp"
+#include "msg.hpp"
InfoBlock::InfoBlock(const lisp::Lisp& lisp)
- : Block(sprite_manager->create("infoblock"))
+ : Block(sprite_manager->create("images/objects/bonus_block/infoblock.sprite"))
{
Vector pos;
lisp.get("x", pos.x);
bbox.set_pos(pos);
if(!lisp.get("message", message)) {
- std::cerr << "No message in InfoBlock!\n";
+ msg_warning << "No message in InfoBlock" << std::endl;
}
- stopped = false;
- ringing = new AmbientSound(get_pos(), 0.5, 300, 1, "phone");
- Sector::current()->add_object(ringing);
+ //stopped = false;
+ //ringing = new AmbientSound(get_pos(), 0.5, 300, 1, "sounds/phone.wav");
+ //Sector::current()->add_object(ringing);
}
InfoBlock::~InfoBlock()
InfoBlock::hit(Player& )
{
start_bounce();
- if (!stopped) {
- ringing->remove_me();
- stopped = true;
- }
+ //if (!stopped) {
+ // ringing->remove_me();
+ // stopped = true;
+ //}
GameSession::current()->display_info_box(message);
}