grafika_komputerowa/grk/project/GameUtils.h
2024-01-10 20:56:20 +01:00

38 lines
628 B
C++

#include <list>
#include "Sun.h"
#pragma once
class GameUtils
{
private:
// Private constructor to prevent external instantiation
GameUtils() : aspectRatio(1.f)
{
this->suns = new std::list<Sun*>();
}
std::list<Sun*>* suns;
float aspectRatio;
public:
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;
}
};