0
0
mirror of https://github.com/Nimac0/SDL_Minigame synced 2026-01-12 10:13:42 +00:00
SDL_Minigame/include/AssetManager.h
freezarite 9bb9d0fbcc removed maps regarding music and sound effects from the AssetManager
reworked SoundManager to use enum classes as keys in its maps and to no longer use the AssetManager
added possibility to set sound effect of projectiles when creating them (was hard coded)
2025-01-28 19:08:05 +01:00

39 lines
737 B
C++

#pragma once
#include <SDL3/SDL_render.h>
#include <SDL3_mixer/SDL_mixer.h>
#include <map>
#include <string>
#include <functional>
#include "Entity.h"
#include "SoundEffects.h"
class Vector2D;
class Manager;
enum class PowerupType
{
HEART,
WALKINGSPEED,
SHOOTINGSPEED
};
class AssetManager
{
public:
AssetManager(Manager* manager);
~AssetManager();
void createProjectile(Vector2D pos, Vector2D velocity, int scale, int range, float speed, Textures textureEnum, Entity* owner, SoundEffects soundEffect);
void createPowerup(Vector2D pos, std::function<void (Entity*)> pickupFunc, Textures texture);
Vector2D calculateSpawnPosition();
PowerupType calculateType();
private:
Manager* man;
};