// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef __SUPERTUX_LANTERN_H__
-#define __SUPERTUX_LANTERN_H___
+#define __SUPERTUX_LANTERN_H__
#include "object/moving_sprite.hpp"
#include "object/rock.hpp"
/**
* Lantern. A portable Light Source.
*/
-class Lantern : public Rock
+class Lantern : public Rock
{
public:
+ Lantern(const Vector& pos);
Lantern(const lisp::Lisp& reader);
void draw(DrawingContext& context);
~Lantern();
+ HitResponse collision(GameObject& other, const CollisionHit& hit);
+
+ void grab(MovingObject& object, const Vector& pos, Direction dir);
+ void ungrab(MovingObject& object, Direction dir);
+
+ /**
+ * returns true if lamp is currently open
+ */
+ bool is_open();
+
+ /**
+ * returns the lamp's color
+ */
+ Color get_color() const {
+ return lightcolor;
+ }
+
private:
Color lightcolor;
Sprite* lightsprite;