// Jason Brillante "Damdoshi"
// Hanged Bunny Studio 2014-2015
//
// Sewer Glue

#include		"Intro.hpp"

bool			hbs::Intro::Play(uint64_t		delay)
{
  (void)delay;
  if (bunny == -60)
    jingle.play();

  if (step == 0)
    {
      if (bunny + (int)ressources[BUNNY].getSize().y > sg->GetScreenHeight())
	bunny -= 1;
      else
	step = 1;
    }
  else if (step == 1)
    {
      warping = true;
      warp_animation = 0;
      destination = hbs::SewerGlue::MENU;
      step = 2;
    }

  if (warping && (warp_animation += 1) >= 9)
    sg->module[sg->klondike = destination]->Reset();
  return (false);
}

