-BouncyBrick::BouncyBrick(const Vector& pos)
- : position(pos), offset(0), offset_m(-BOUNCY_BRICK_SPEED),
- shape(Sector::current()->solids->get_tile_id_at(pos))
-{
- shape.hidden = true;
-}
-
-void
-BouncyBrick::action(float elapsed_time)
-{
- offset += offset_m * elapsed_time;
-
- /* Go back down? */
- if (offset < -BOUNCY_BRICK_MAX_OFFSET)
- offset_m = BOUNCY_BRICK_SPEED;