After watching this
, I got some inspiration on how to improve my game. However, I have some trouble implementing it.
I started creating actions like this:
self.X = lerp(self.tweenStartX, self.tweenEndX, (time-self.tweenStart)/(self.tweenEnd-self.tweenStart))
But this seems messy, especially if I want to do non-linear interpolation.
Maybe there is some plugin/behaviour I can use, or a way I can define my own functions, so I can easily change the interpolation function once without having to do edit every place I use tweening?
What is the cleanest solution?