// // bullet_pattern.hpp // danmaku // // Created by Sam Jaffe on 5/26/19. // Copyright © 2019 Sam Jaffe. All rights reserved. // #pragma once #include #include namespace objects { namespace prototype { template class factory; }} namespace danmaku { class actor; struct bullet_timer { float const interval; float remaining{0.f}; }; struct bullet_pattern { virtual ~bullet_pattern() = default; virtual void update(float delta) = 0; }; using bullet_pattern_factory = objects::prototype::factory< std::shared_ptr, actor*, Json::Value const &>; } #define BIND_BULLET_PATTERN(name, function) \ bool const _ = bullet_pattern_factory::instance().bind(name, function) \