Make boxes hit by bigtux from below bounce before they are destroyed.
[supertux.git] / src / object / block.hpp
index 07b37cb..c1f78b9 100644 (file)
@@ -41,9 +41,12 @@ protected:
 
   virtual void hit(Player& player) = 0;
   void start_bounce();
+  void start_break();
+  void break_me();
 
   Sprite* sprite;
   bool bouncing;
+  bool breaking;
   float bounce_dir;
   float bounce_offset;
   float original_y;
@@ -56,6 +59,7 @@ public:
   BonusBlock(const Vector& pos, int data);
   BonusBlock(const lisp::Lisp& lisp);
   virtual ~BonusBlock();
+  HitResponse collision(GameObject& other, const CollisionHit& hit);
 
   void try_open();
 
@@ -82,6 +86,7 @@ public:
   Brick(const Vector& pos, int data);
 
   void try_break(bool playerhit = false);
+  HitResponse collision(GameObject& other, const CollisionHit& hit);
 
 protected:
   virtual void hit(Player& player);
@@ -92,4 +97,3 @@ private:
 };
 
 #endif
-