ecj2 / momo

[NOT MAINTAINED / ABANDONED] A simple 2D game-making library written in JavaScript.
MIT License
1 stars 0 forks source link

isMouseButtonUp / isMouseButtonDown #22

Closed bambams closed 6 years ago

bambams commented 6 years ago

https://github.com/ecj2/momo/blob/b74929b0ba6c208fbc587eb6edd44dcbe3b9bec2/momo.js#L190

This appears to be redundant logic as well. Basically the inverse of one another. If I'm not missing something you could implement one as not-the-other.

ecj2 commented 6 years ago

You would be correct, but the behavior of using "any" instead of a specific button does not work as expected when returning one as the inverse of the other, and I am not sure it is worth the effort to fix this just to shave a few lines.