VEGO-Engine  0.1
Loading...
Searching...
No Matches
AssetManager Class Reference

Public Member Functions

 AssetManager (Manager *manager)
 
void createProjectile (Vector2D pos, Vector2D velocity, int scale, int range, int speed, const char *texturePath, Entity *owner)
 
void createPowerup (Vector2D pos, std::function< void(Entity *)> pickupFunc, std::string texturePath)
 
Vector2D calculateSpawnPosition (Vector2D size, Vector2D spawnArea)
 Calculates a random spawn position for an object within a given area.
 
template<typename T >
calculateRandomType (int amount)
 
void addTexture (std::string id, const char *path)
 
void addSoundEffect (std::string id, const char *path)
 
void addMusic (std::string id, const char *path)
 
SDL_Texture * getTexture (std::string id)
 
Mix_Chunk * getSound (std::string id)
 
Mix_Music * getMusic (std::string id)
 

Member Function Documentation

◆ calculateSpawnPosition()

Vector2D AssetManager::calculateSpawnPosition ( Vector2D size,
Vector2D spawnArea )

Calculates a random spawn position for an object within a given area.

Parameters
sizeThe size (collision box) of the object
spawnAreaThe area within which a spawn position will be calculated
Returns
Spawn Coordinates for the object

The documentation for this class was generated from the following files: