#include "audio/sound_manager.hpp"
#include "badguy/badguy.hpp"
+#include "object/broken_brick.hpp"
#include "object/coin.hpp"
#include "object/flower.hpp"
#include "object/growup.hpp"
#include "object/player.hpp"
#include "object/portable.hpp"
#include "supertux/constants.hpp"
+#include "supertux/sector.hpp"
static const float BOUNCY_BRICK_MAX_OFFSET = 8;
static const float BOUNCY_BRICK_SPEED = 90;
breaking = true;
}
+void
+Block::break_me()
+{
+ Sector* sector = Sector::current();
+ sector->add_object(
+ new BrokenBrick(sprite->clone(), get_pos(), Vector(-100, -400)));
+ sector->add_object(
+ new BrokenBrick(sprite->clone(), get_pos() + Vector(0, 16),
+ Vector(-150, -300)));
+ sector->add_object(
+ new BrokenBrick(sprite->clone(), get_pos() + Vector(16, 0),
+ Vector(100, -400)));
+ sector->add_object(
+ new BrokenBrick(sprite->clone(), get_pos() + Vector(16, 16),
+ Vector(150, -300)));
+ remove_me();
+}
+
/* EOF */
#include "audio/sound_manager.hpp"
#include "badguy/badguy.hpp"
#include "lisp/list_iterator.hpp"
-#include "object/broken_brick.hpp"
#include "object/flower.hpp"
#include "object/bouncy_coin.hpp"
#include "object/coin_explode.hpp"
}
void
-Block::break_me()
-{
- Sector* sector = Sector::current();
- sector->add_object(
- new BrokenBrick(sprite->clone(), get_pos(), Vector(-100, -400)));
- sector->add_object(
- new BrokenBrick(sprite->clone(), get_pos() + Vector(0, 16),
- Vector(-150, -300)));
- sector->add_object(
- new BrokenBrick(sprite->clone(), get_pos() + Vector(16, 0),
- Vector(100, -400)));
- sector->add_object(
- new BrokenBrick(sprite->clone(), get_pos() + Vector(16, 16),
- Vector(150, -300)));
- remove_me();
-}
-
-void
BonusBlock::draw(DrawingContext& context){
// do the regular drawing first
Block::draw(context);