0
0
mirror of https://github.com/Nimac0/SDL_Minigame synced 2026-01-12 09:03:42 +00:00
SDL_Minigame/include/AssetManager.h
Nimac0 fcf14b20c4 framework for randomly spawning items
not collectable yet, dont get destroyed either, WIP
2024-01-28 14:56:09 +01:00

30 lines
596 B
C++

#include <SDL_render.h>
#include <map>
#include <string>
#include "Powerup.h"
class Vector2D;
class Manager;
class AssetManager
{
public:
AssetManager(Manager* manager);
~AssetManager();
void createProjectile(Vector2D pos, Vector2D velocity, bool source, int scale, int range, int speed, const char* texturePath);
void createPowerup(Vector2D pos, PowerupType type);
//texture management
void addTexture(std::string id, const char* path);
SDL_Texture* getTexture(std::string id);
private:
Manager* man;
std::map<std::string, SDL_Texture*> textures;
};