I just wanted to make an example for an added feature to my True Tile Collision - hurt state/ kickback. For example, I wanted to have kickback based on direction sprite is flipped.
I think it would be a handy feature to have. Not that I can’t live without it. Just saying - if there’s “set”, there got to be “get”.
Any thoughts about that?
Usually this is true. If there’s a set_foo() there should also be a get_foo(). But I’m thinking that the get_foo() is needed not only because you called set_foo() but maybe also because foo was changed by something else in the system. In this case it’s only you yourself who calls set_hflip() and in that case you can keep track of this yourself.
3 Likes
Oh, haven’t thought about that! Point taken.
I’m not totally against a sprite.get_hflip(), it’s just that every little addition to the APIs add a little bit of size, and we’re very concerned about engine size and therefore a bit wary every time we need to add a new API.
8 Likes