// // actor.hpp // danmaku // // Created by Sam Jaffe on 5/26/19. // Copyright © 2019 Sam Jaffe. All rights reserved. // #pragma once #include "game/engine/entity.hpp" namespace objects { namespace prototype { template class factory; }} namespace graphics { class manager; } namespace danmaku { class level; struct actor : public engine::entity { using engine::entity::entity; virtual ~actor() = default; virtual void update(float delta) = 0; virtual void level(class level *) = 0; virtual class level * level() const = 0; }; struct bullet_pattern; using attack_factory = std::function( Json::Value const &, actor *)>; using actor_factory = objects::prototype::factory, Json::Value const &, graphics::object const &, attack_factory>; } #define BIND_ACTOR(name, function) \ bool const _ = actor_factory::instance().bind(name, function)