Reworked Thunderstorm scripting
[supertux.git] / src / object / weak_block.hpp
index 41a83ae..cc5baf8 100644 (file)
@@ -1,4 +1,4 @@
-//  $Id: weak_block.hpp 3327 2006-04-13 15:02:40Z ravu_al_hemio $
+//  $Id$
 //
 //  SuperTux - Weak Block
 //  Copyright (C) 2006 Matthias Braun <matze@braunis.de>
 #ifndef __WEAK_BLOCK_H__
 #define __WEAK_BLOCK_H__
 
-#include "moving_object.hpp"
+#include "object/moving_sprite.hpp"
 #include "lisp/lisp.hpp"
 #include "physic.hpp"
 #include "timer.hpp"
-#include "sprite/sprite.hpp"
 
 /** 
  * A block that can be destroyed by Bullet hits
  */
-class WeakBlock : public MovingObject
+class WeakBlock : public MovingSprite
 {
 public:
   WeakBlock(const lisp::Lisp& lisp);
-  ~WeakBlock();
 
   HitResponse collision(GameObject& other, const CollisionHit& hit);
   void update(float elapsed_time);
-  void draw(DrawingContext& context);
+
+protected:
+  /**
+   * called by self when hit by a bullet
+   */
+  void startBurning();
+
+  /**
+   * pass hit to nearby WeakBlock objects
+   */
+  void spreadHit();
 
 private:
   enum State {
@@ -49,7 +57,6 @@ private:
   State state;
 
   Physic physic;
-  Sprite* sprite;
 };
 
 #endif