3 Spike::Spike(const Vector& pos, Direction dir)
5 sprite = sprite_manager->create("spike");
7 bbox.set_pos(Vector(0, 0));
12 Spike::Spike(const lisp::Lisp& reader)
14 sprite = sprite_manager->create("spike");
15 reader.get("x", start_position.x);
16 reader.get("y", start_position.y);
17 bbox.set_size(32, 32);
19 reader.get("direction", idir);
20 set_direction((Direction) idir);
24 Spike::set_direction(Direction dir)
29 sprite->set_action("north");
32 sprite->set_action("south");
35 sprite->set_action("west");
38 sprite->set_action("east");
46 Spike::write(lisp::Writer& writer)
48 writer.start_list("spike");
49 writer.write_float("x", start_position.x);
50 writer.write_float("y", start_position.y);
51 writer.write_int("direction", spikedir);
52 writer.end_list("spike");
58 // you can't kill a spike
62 Spike::active_action(float )