kikito / anim8

An animation library for LÖVE
MIT License
730 stars 88 forks source link

Check position after invoking onLoop callbacks #21

Closed jaythomas closed 7 years ago

jaythomas commented 7 years ago

Resolves #19.

After commenting in the original issue I had time to go back and test it today and come up with this better solution. This will prevent a conflict with setting the frame in the onLoop callback. Otherwise, if gotoFrame() is used in the onLoop() and we override the position without checking, there will be a visual glitch.

The unit test I wrote passes only after adding the if statement check I added. Let me know if there is anything else I should check. Thanks!

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.6%) to 98.954% when pulling 1bf2f3c4c51ba727e4a21f17c3578ca1665f6d74 on jaythomas:master into 539cc26fee6517a37448ee70ee830e56921137be on kikito:master.

kikito commented 7 years ago

I am closing this down in favor of #28. Thanks a lot for taking the time to send a PR.