| 1234567891011121314151617181920212223 |
- //
- // enemy.cxx
- // danmaku
- //
- // Created by Sam Jaffe on 5/26/19.
- // Copyright © 2019 Sam Jaffe. All rights reserved.
- //
- #include "danmaku/enemy.hpp"
- #include <json/json.h>
- #include "danmaku/bullet_pattern.hpp"
- #include "resource_factory/prototype_factory.hpp"
- using namespace danmaku;
- points_map to_points_map(Json::Value const & json) {
- return {json["damage"].asInt(), json["kill"].asInt()};
- }
- enemy::enemy(Json::Value const & json, graphics::object const & obj)
- : actor(json, obj), points_(to_points_map(json["points"])), attack_() {}
|