Animations are now being pulled correctly but I need to add a timing concept to animations instead of ticks.

This commit is contained in:
Zed A. Shaw 2025-10-10 00:25:37 -04:00
parent 517de91a5b
commit c33f370572
10 changed files with 43 additions and 22 deletions

View file

@ -145,7 +145,7 @@ namespace gui {
}
void MainUI::render_hands() {
if(animation::apply($hand_anim, *$hand.sprite)) {
if(animation::apply($hand_anim, *$hand.sprite, {0,0})) {
$hand.sprite->setPosition({RAY_VIEW_X, RAY_VIEW_Y});
$window.draw(*$hand.sprite);
}

View file

@ -94,7 +94,7 @@ namespace gui {
void UI::OPENING(Event ev) {
if(ev == Event::TICK) {
if(!animation::apply($ritual_anim, *$ritual_ui.sprite)) {
if(!animation::apply($ritual_anim, *$ritual_ui.sprite, {0,0})) {
state(State::OPENED);
}
}