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

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.
 

Detailed Description

PickupManager class to handle the creation and management of pickups in the game.

Member Function Documentation

◆ createPickupable()

void PickupManager::createPickupable ( Vector2D pos,
std::function< void(Entity *)> pickupFunc,
Textures texture )

Creates a pickupable item and adds it to the manager.

Parameters
posThe position of the pickupable item
pickupFuncThe function to be called when the pickupable item is picked up
textureThe 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.


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