5 #include "special/sprite_manager.h"
6 #include "video/drawing_context.h"
8 #include "object_factory.h"
12 Bell::Bell(const lisp::Lisp& lisp)
15 lisp.get("x", bbox.p1.x);
16 lisp.get("y", bbox.p1.y);
17 bbox.set_size(32, 32);
18 sprite = sprite_manager->create("bell");
27 Bell::write(lisp::Writer& writer)
29 writer.start_list("bell");
30 writer.write_float("x", bbox.p1.x);
31 writer.write_float("y", bbox.p1.y);
32 writer.end_list("bell");
41 Bell::draw(DrawingContext& context)
43 sprite->draw(context, get_pos(), LAYER_TILES);
47 Bell::collision(GameObject& other, const CollisionHit& )
52 Player* player = dynamic_cast<Player*> (&other);
56 sprite->set_action("ringing");
57 GameSession::current()->set_reset_point(Sector::current()->get_name(),
64 IMPLEMENT_FACTORY(Bell, "bell");