|
VEGO-Engine
0.1
|
PickupManager class to handle the creation and management of pickups in the game. More...
#include <PickupManager.h>
Public Member Functions | |
| void | createPickupable (Vector2D pos, std::function< void(Entity *)> pickupFunc, Textures texture) |
| Creates a pickupable item and adds it to the manager. | |
PickupManager class to handle the creation and management of pickups in the game.
| void PickupManager::createPickupable | ( | Vector2D | pos, |
| std::function< void(Entity *)> | pickupFunc, | ||
| Textures | texture ) |
Creates a pickupable item and adds it to the manager.
| pos | The position of the pickupable item |
| pickupFunc | The function to be called when the pickupable item is picked up |
| texture | The texture of the pickupable item |
This function creates a pickupable item entity and adds it to the manager. The pickupable item is created with a transform component, a sprite component, a collider component and a pickup component. The pickup function is called when the powerup is picked up by an entity.