|
|
@@ -35,3 +35,11 @@ enemy::enemy(Json::Value const & json, graphics::object const & obj,
|
|
|
: actor(json, obj), points_(to_points_map(json["points"])) {
|
|
|
attack_ = to_vector(json["attack"], get_attack, this);
|
|
|
}
|
|
|
+
|
|
|
+std::unique_ptr<enemy> make_enemy(Json::Value const & json,
|
|
|
+ graphics::object const & obj,
|
|
|
+ attack_factory get_attack) {
|
|
|
+ return std::make_unique<enemy>(json, obj, get_attack);
|
|
|
+}
|
|
|
+
|
|
|
+BIND_ACTOR("enemy", &make_enemy);
|