A bit of refactor to put apply in Animation where it belongs.
This commit is contained in:
parent
102c8c36d5
commit
d60e1af6df
10 changed files with 32 additions and 31 deletions
|
|
@ -145,7 +145,7 @@ namespace gui {
|
|||
}
|
||||
|
||||
void MainUI::render_hands() {
|
||||
if(animation::apply($hand_anim, *$hand.sprite, {0,0})) {
|
||||
if($hand_anim.apply(*$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, {0,0})) {
|
||||
if(!$ritual_anim.apply(*$ritual_ui.sprite, {0,0})) {
|
||||
state(State::OPENED);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue