44 lines
845 B
C++
44 lines
845 B
C++
#include <list>
|
|
#include "Sun.h"
|
|
#include "Bullet.h"
|
|
#include "src/Shader_Loader.h"
|
|
|
|
#pragma once
|
|
class GameUtils
|
|
{
|
|
private:
|
|
// Private constructor to prevent external instantiation
|
|
GameUtils() : aspectRatio(1.f)
|
|
{
|
|
this->suns = new std::list<Sun*>();
|
|
this->shaderLoader = new Core::Shader_Loader();
|
|
}
|
|
std::list<Sun*>* suns;
|
|
std::list<Bullet*> bullets;
|
|
float aspectRatio;
|
|
|
|
|
|
public:
|
|
Core::Shader_Loader* shaderLoader;
|
|
Core::RenderContext sphereContext;
|
|
|
|
|
|
float getAspectRatio() {
|
|
return aspectRatio;
|
|
}
|
|
|
|
void setAspectRatio(float value) {
|
|
aspectRatio = value;
|
|
}
|
|
|
|
std::list<Sun*>* getSuns() {
|
|
return suns;
|
|
}
|
|
|
|
static GameUtils* getInstance()
|
|
{
|
|
static GameUtils instance; // Jedna i jedyna instancja
|
|
return &instance;
|
|
}
|
|
};
|