Skip to content

Commit

Permalink
death sequence for guardian
Browse files Browse the repository at this point in the history
  • Loading branch information
evanbowman committed Oct 27, 2022
1 parent e2ba72b commit ecbd8f3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions source/objects/enemies/boss/guardian.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,22 @@ class DetachedCore : public Enemy
kill();
engine().add_object<Explo>(position_);

platform().speaker().play_sound("snd_bossroar", 12);
platform().speaker().play_sound("snd_explo4", 14);

for (int i = 0; i < 6; ++i) {
for (int j = 0; j < 8; ++j) {
if (auto exp = engine().add_object<BigExplo>(position_)) {
auto dir = rotate({1, 0}, j * 90 + 45 + i * 3);
dir = dir * ((i + 1 / 2.f) * 1.5f);
Vec2<Fixnum> spd;
spd.x = Fixnum(dir.x);
spd.y = Fixnum(dir.y);
exp->set_speed(spd);
}
}
}

engine().p_->objects_removed_.push_back({
(u8)engine().room_.coord_.x,
(u8)engine().room_.coord_.y,
Expand Down

0 comments on commit ecbd8f3

Please sign in to comment.