37 lines
No EOL
796 B
C++
37 lines
No EOL
796 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 glm::vec3& fireFrom,
|
|
const glm::vec2& direction,
|
|
float bulletSpeed,
|
|
float bulletDrop,
|
|
glm::vec2 bulletSize,
|
|
const std::shared_ptr<Shader>& shader,
|
|
const std::shared_ptr<Component>& sprite);
|
|
|
|
void update(float deltaTime);
|
|
void render(const std::shared_ptr<Camera>& camera);
|
|
|
|
void hookEventManager(const std::shared_ptr<EventManager>& eventManager);
|
|
|
|
private:
|
|
std::vector<std::shared_ptr<Bullet>> bullets;
|
|
std::shared_ptr<EventManager> eventManager;
|
|
};
|
|
|
|
#endif |