#pragma once

#include "planet.h"
#include "skybox.h"
#include "../scroller/introText.h"
#include "../resources/resource.h"
#include "../sys/shaders/Shader.h"
//#include "../glm/glm.hpp"
#include "../lightingAndMaterials/Light.h"
#include "../sys/extra/RNG.h"

class planets
{
	RNG *_rand;
	introText *_introText;
	float eyeX;
	float eyeY;
	float eyeZ;

	float centerX;
	float centerY;
	float centerZ;

	float upX;
	float upY;
	float upZ;

	bool _movePlanets;

	planet *planetSun;
	skybox* sky;
	Light* light;
	GLuint bgTex, ssTex1, ssTex2;
	float _aspect;
	void planets::initFbo();
	void planets::getLightScreenCoor(Light* light);
	void planets::HandleCamera(float time);

	float timeChimeStart;
	float timeKickStart;
	float timeSnareStart;
public:
	void EffectKickDrum(float time);
	void EffectSnareDrum(float time);
	void EffectChime(float time);
	float sunScale;

	bool enabledGodRays;
	bool godRaysFadingUp;
	float startTimeGodRays;
	float planetMoveTime;

	void planets::MovePlanetsOutFromSun(float time);
	planets(introText* introTextObj);
	~planets(void);
	void StartGodRays(float time);
	void StartSunspots(float time);
	void Draw(float time);	
};
