gameEngine/gameEngine/SensorActuators/SceneActuator.cpp
//run command based on given condition, if none given assume set given scene
run command based on given condition, if none given assume set given scene
run command based on given condition if none given assume set given scene
void SceneActuator::run()
{
	if (condition == "na")
	{
		SceneDirector::getInstance()->setScene(scene);
	}
	else if (condition == "next")
	{
		SceneDirector::getInstance()->nextScene();
		SceneDirector::getInstance()->setSceneBackground("textures/BG.png");
	}
	else if (condition == "previous")
	{
		SceneDirector::getInstance()->previousScene();
	}
	else if (condition == "setPause")
	{
		SceneDirector::getInstance()->setScenePause(scene);
	}
	else if (condition == "pause")
	{
		SceneDirector::getInstance()->pauseScene(scene);
	}
	else if (condition == "togglePause")
	{
		if (scene->getActive())
		{
			SceneDirector::getInstance()->pauseScene(scene);
		}
		else
		{
			SceneDirector::getInstance()->unpauseScene(scene);
		}
	}
	else
	{
		std::cout << "\n SceneActurator is set to run but not doing anything, something went wrong";
	}
}
void SceneActuator :: run ( ) { if ( condition == " " ) { SceneDirector :: getInstance ( ) -> setScene ( scene ) ; } else if ( condition == " " ) { SceneDirector :: getInstance ( ) -> nextScene ( ) ; SceneDirector :: getInstance ( ) -> setSceneBackground ( " " ) ; } else if ( condition == " " ) { SceneDirector :: getInstance ( ) -> previousScene ( ) ; } else if ( condition == " " ) { SceneDirector :: getInstance ( ) -> setScenePause ( scene ) ; } else if ( condition == " " ) { SceneDirector :: getInstance ( ) -> pauseScene ( scene ) ; } else if ( condition == " " ) { if ( scene -> getActive ( ) ) { SceneDirector :: getInstance ( ) -> pauseScene ( scene ) ; } else { SceneDirector :: getInstance ( ) -> unpauseScene ( scene ) ; } } else { std :: cout << " \n " ; } }
run command based on given condition, if none given assume set given scene
run command based on given condition if none given assume set given scene