Have a barely working animation thing that animates the evil eye when you click a button.
This commit is contained in:
parent
51c1e04f61
commit
b87217ff90
7 changed files with 35 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue