Mario: enable death from bounce for Goomba

This commit is contained in:
2023-04-08 19:43:36 +02:00
parent b175e58714
commit d41c77ab96
3 changed files with 14 additions and 1 deletions
+4 -1
View File
@@ -64,11 +64,14 @@ void GoombaBlock::handleVisitor(SDLPP::Visitor &visitor) {
setPos(g_visitor.getValidXPos(), getPos().getY());
setMovement(-getMovement().getX(), getMovement().getY());
}
if (g_visitor.shouldBounce()) {
setMovement(getMovement().getX(), -0.5);
}
if (g_visitor.isDead()) {
removeCollisions();
pauseAnimation();
setBaseRect(GOOMBA_DEATH_SRC);
setMovement(0, 0);
setMovement(0, getMovement().getY());
startDeath();
// destroy();
}