Skip to content

Commit

Permalink
Fix missing goldbomb "ticking-glow", attempt to fix dark WeakBlock
Browse files Browse the repository at this point in the history
…"burn-light"
  • Loading branch information
Vankata453 committed Dec 5, 2024
1 parent 40d37c9 commit 080a666
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion data/images/creatures/gold_bomb/gold_bomb.sprite
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,6 @@
(mirror-action "ticking-left"))

(linked-sprites
(ticking-glow "images/creatures/mr_bomb/ticking_glow/ticking_glow.sprite")
(ticking-glow "images/creatures/mr_bomb/ticking_glow/ticking_glow.sprite" "exploding")
)
)
12 changes: 12 additions & 0 deletions src/object/weak_block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,18 @@ WeakBlock::get_linked_sprites()
return {};
}

void
WeakBlock::on_sprite_update()
{
MovingSprite::on_sprite_update();

if (m_type == HAY)
{
m_burn_sprite->set_blend(Blend::ADD);
m_burn_sprite->set_color(Color(0.3f, 0.2f, 0.1f));
}
}

void
WeakBlock::update_version()
{
Expand Down
2 changes: 2 additions & 0 deletions src/object/weak_block.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ class WeakBlock final : public MovingSprite
protected:
LinkedSprites get_linked_sprites() override;

void on_sprite_update() override;

private:
virtual HitResponse collision_bullet(Bullet& bullet, const CollisionHit& hit);

Expand Down

0 comments on commit 080a666

Please sign in to comment.