Need a tip on functions, in coffeescript.
I have card1, card2, card3, card4 and card5, with icons1-5 as well.
They all come the say way, and go the same way. But each time i animate them manually, it makes a very long code.
What i want is, create an animation function for them for all. For example
I know states.add does this, but for sequential objects, i add their states in a "for" loop, but out of the for loop, i can't call their states anymore.
I don't know how you guys are doing these functions, but i'd like to hear.
(in coffeescript if possible)
(also dynamic functions are appreciated, e.g: function Come(int speedX, int curve) kind of logic)
Thanks in advance,