40 lines
No EOL
852 B
C++
40 lines
No EOL
852 B
C++
#ifndef _H_BULLETMANAGER_H
|
|
#define _H_BULLETMANAGER_H
|
|
|
|
#include <glm/glm.hpp>
|
|
#include <vector>
|
|
#include <memory>
|
|
|
|
class Bullet;
|
|
class Sprite;
|
|
class Shader;
|
|
class Component;
|
|
class Camera;
|
|
class EventManager;
|
|
|
|
class BulletManager
|
|
{
|
|
public:
|
|
void addBullet(const std::shared_ptr<Bullet>& bullet);
|
|
void addBullet(const unsigned int owner,
|
|
const glm::vec3& fireFrom,
|
|
const glm::vec2& direction,
|
|
float bulletSpeed,
|
|
float bulletDrop,
|
|
glm::vec2 bulletSize,
|
|
const unsigned& shaderID,
|
|
const std::shared_ptr<Component>& sprite);
|
|
|
|
void update(double deltaTime);
|
|
void draw();
|
|
|
|
void hookEventManager(const std::shared_ptr<EventManager>& eventManager);
|
|
|
|
const std::vector<std::shared_ptr<Bullet>> getBullets() { return bullets; }
|
|
|
|
private:
|
|
std::vector<std::shared_ptr<Bullet>> bullets;
|
|
std::shared_ptr<EventManager> eventManager;
|
|
};
|
|
|
|
#endif |