Have a barely working animation thing that animates the evil eye when you click a button.

This commit is contained in:
Zed A. Shaw 2025-01-27 05:40:04 -05:00
parent 51c1e04f61
commit b87217ff90
7 changed files with 35 additions and 2 deletions

View file

@ -150,8 +150,9 @@ void Raycaster::sprite_casting() {
int texY = ((d * textureHeight) / spriteHeight) / textureHeight;
sf_sprite->setScale({sprite_w, sprite_h});
sf_sprite->setTextureRect(sf::IntRect({texX, texY}, {texX_end - texX, textureHeight}));
$anim.step(*sf_sprite, texX, texY, texX_end - texX, textureHeight);
sf_sprite->setPosition({x, y});
$window.draw(*sf_sprite);
}
}