|
@@ -25,7 +25,7 @@ using shot = std::pair<math::vec2, float>;
|
|
|
|
|
|
|
|
struct burstshot : public danmaku::bullet_pattern {
|
|
struct burstshot : public danmaku::bullet_pattern {
|
|
|
static std::shared_ptr<burstshot>
|
|
static std::shared_ptr<burstshot>
|
|
|
- create(danmaku::actor *, Json::Value const &, graphics::manager &);
|
|
|
|
|
|
|
+ create(danmaku::actor *, Json::Value const &, graphics::manager const &);
|
|
|
|
|
|
|
|
burstshot(danmaku::actor *, float shot_interval, std::vector<shot> shots,
|
|
burstshot(danmaku::actor *, float shot_interval, std::vector<shot> shots,
|
|
|
bullet bullet);
|
|
bullet bullet);
|
|
@@ -64,13 +64,14 @@ burstshot::burstshot(danmaku::actor * actor, float shot_interval,
|
|
|
: actor(actor), shot_timer{shot_interval}, shots(shots), bullet_proto(blt) {
|
|
: actor(actor), shot_timer{shot_interval}, shots(shots), bullet_proto(blt) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-bullet make_bullet(Json::Value const & json, graphics::manager & manager) {
|
|
|
|
|
|
|
+bullet make_bullet(Json::Value const & json,
|
|
|
|
|
+ graphics::manager const & manager) {
|
|
|
return bullet(json["damage"].asInt(), {}, engine::to_object(json, manager));
|
|
return bullet(json["damage"].asInt(), {}, engine::to_object(json, manager));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-std::shared_ptr<burstshot> burstshot::create(danmaku::actor * actor,
|
|
|
|
|
- Json::Value const & json,
|
|
|
|
|
- graphics::manager & manager) {
|
|
|
|
|
|
|
+std::shared_ptr<burstshot>
|
|
|
|
|
+burstshot::create(danmaku::actor * actor, Json::Value const & json,
|
|
|
|
|
+ graphics::manager const & manager) {
|
|
|
return std::make_shared<burstshot>(
|
|
return std::make_shared<burstshot>(
|
|
|
actor, json["timeBetweenBullets"].asFloat(),
|
|
actor, json["timeBetweenBullets"].asFloat(),
|
|
|
shot_vector(json["bulletsPerWave"].asUInt(),
|
|
shot_vector(json["bulletsPerWave"].asUInt(),
|