kikito / anim8

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

Consider an animation:clone() function #1

Closed Kadoba closed 12 years ago

Kadoba commented 12 years ago

Consider creating a clone function for animations. It would be nice to create animation prototypes and then clone from them.

kikito commented 12 years ago

Mmmmm. I don't know why, but I find myself hesitating to add that feature. Trouble is, I can't really say why. It's just that my arachnid sense is tingling.

On the other hand, it makes total sense. Let me think about this for a while.

kikito commented 12 years ago

The thing that was "nagging me" was my "that is not proper object orientation!" alarm.

But hey, Lua is not object oriented by default. A clone() method seems very reasonable in a prototype-based language.

Besides, adding the method involved 3 lines of code. I might as well give my users some pleasure.

In any case, this is done. I've released v1.1.0 with your two suggestions. Thanks!