Animations are now being pulled correctly but I need to add a timing concept to animations instead of ticks.
This commit is contained in:
parent
517de91a5b
commit
c33f370572
10 changed files with 43 additions and 22 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue