Newer
Older
Import / projects / Gameloft / bne_lib / code / GameStates / StateStart.cpp
@John John on 29 Dec 2020 366 bytes bulk import from macbookpro checkouts
#include "StateStart.h"
#include "CasualCore.h"

StateStart::StateStart(OnStartState starter)
: State("StateStart")
, m_pfStarter(starter)
{
  RKASSERT(m_pfStarter, "Start state callback cannot be empty");
}

bool StateStart::Update(float time_elapsed)
{
  if (m_pfStarter)
  {
    m_pfStarter();
    m_pfStarter = nullptr;
  }

  return true;
}