#include "ActionHaltAndWait.h"
#include "Unit.h"
#include "ActionWait.h"

#include "MemoryManager/debugNew.h"

ActionHaltAndWait::ActionHaltAndWait(Unit * u) : UnitAction(u,u->getState())
{
	this->unit = u;
}

ActionHaltAndWait::~ActionHaltAndWait(void)
{
}

void ActionHaltAndWait::execute(){
	this->unit->setAnimation(RenderSystem::RenderableEntity::WAIT,unit->isMounted());
	unit->pushAction(new ActionWait(unit,unit->getState()));
	unit->setState(unit->getState());
	dispose();
}

