Changed jump behaviour: Tux will now jump even if the button was pressed (up to)...
[supertux.git] / src / object / lantern.hpp
index 13356cd..b8498a3 100644 (file)
 /**
  * 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;
+  void updateColor();
 };
 
 #endif