#ifndef BACKGROUNDMANAGER_H
#define BACKGROUNDMANAGER_H

#include "IManager.h"

using namespace Salamander;

class CameraEvent;

class BackgroundManager : public IManager
{
    public:
		registerManager();
        BackgroundManager();
        virtual ~BackgroundManager();

        virtual bool startup();
        virtual bool shutdown();

        virtual void frame();

	private:
		void generateBackground();
		void generateMidground();

		void onCameraEvent(const CameraEvent& event);
		double moddouble(double numerator, double denominator);

    private:
		Sprite* background_;

		Vec2 backgroundfalloffset_;
		unsigned int midgroundeffectcount_;
};


#endif // BACKGROUNDMANAGER_H
