All of the original features now work: simple, flipped, scaled, toggled, looped and stationary is replaced by ease2::scale_only.
This commit is contained in:
parent
34e4a34f65
commit
ca335d21e5
4 changed files with 25 additions and 11 deletions
|
|
@ -169,11 +169,10 @@ animate2::Transform scale_tr{
|
|||
.flipped{false},
|
||||
.ease_rate{1.0f/0.2f},
|
||||
.scaled{true},
|
||||
.stationary{true},
|
||||
.toggled{false},
|
||||
.looped{true},
|
||||
.easing = ease2::in_out_back,
|
||||
.motion = ease2::move_rush,
|
||||
.motion = ease2::scale_only,
|
||||
};
|
||||
|
||||
animate2::Transform move_tr{
|
||||
|
|
@ -185,7 +184,6 @@ animate2::Transform move_tr{
|
|||
.flipped{false},
|
||||
.ease_rate{2.5f},
|
||||
.scaled{true},
|
||||
.stationary{true},
|
||||
.toggled{false},
|
||||
.looped{true},
|
||||
.easing = ease2::normal_dist,
|
||||
|
|
@ -223,9 +221,12 @@ int main(int argc, char* argv[]) {
|
|||
|
||||
for(int i = 0; i < ticks; i++) {
|
||||
main.event(game::Event::TICK, {});
|
||||
anim.update();
|
||||
anim.apply(*sprite);
|
||||
anim.motion(*sprite, pos, scale);
|
||||
|
||||
if(anim.playing) {
|
||||
anim.update();
|
||||
anim.apply(*sprite);
|
||||
anim.motion(*sprite, pos, scale);
|
||||
}
|
||||
}
|
||||
|
||||
main.render();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue