#ifndef PATTERN_H_ # define PATTERN_H_ #include #include #include #include #include "APlayer.hh" #include "Bullet.hh" #include "IRenderable.hh" #include "Core/Core.hh" namespace DamnCute { class Path : public IRenderable { private: sf::Texture _tex; Bullet _bulletModel; std::list _bullets; unsigned int _timeLoad; unsigned int _timeSeparator; glm::mat4 _stepModifier; bool _generate; typedef struct __SmodEvent { unsigned int _futureframe; glm::mat4 _newMat; } modEvent; std::stack _modEventStack; public: explicit Path(const glm::mat4&, unsigned int frameStep = 5, Bullet&& = Bullet(glm::vec2(0,0)), const std::string& = "resources/test.tga"); virtual ~Path() = default; virtual void update(sf::RenderTarget*); void countdownPushMoveModifier(unsigned int, const glm::mat4&); void setPhysicBulletModelId(unsigned int); void setAllPhysicBulletId(unsigned int); inline void moveOrigin(glm::vec2&& n) noexcept { _bulletModel.moveOrigin(std::move(n)); } inline void switchGen() { _generate = !_generate; } inline void setStatusGen(bool&& b) { _generate = b; } inline void setTimeSeparator(unsigned int newTs) { _timeSeparator = newTs; } }; } #endif /* !PATTERN_H_ */