#pragma once
#include "spriteRenderer.h"
#include "resourceManager.h"
#include "animationManager.h"

#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <glm/glm.hpp>
#include <iostream>
#include <vector>

class Cloud
{
    float speed;
    glm::vec2 pos, size;
    glm::vec4 spriteUVs;

    GLuint quadVAO, VBO, EBO;
    Texture Sprite = ResourceManager::LoadTexture("../art/background/CloudsBDayJullietje.png", "cloudSheet");
    ;
    tileSet spriteSheet = tileSet(Sprite, glm::ivec2(20, 20));

public:
    Cloud(float speed, glm::vec2 pos, glm::vec2 size, int cloudIndex);

    void drawCloud(SpriteRenderer &renderer, float dt);
};

class Background
{
private:
    Cloud *cloud = nullptr; 
    std::vector<Cloud *> clouds;

public:
    Background();
    void drawBackground(SpriteRenderer &renderer, float dt);
    void drawClouds(SpriteRenderer &renderer);
};
