Wondering what's better for performance.
I'm starting to work on my animations for my game and since I could not find any info in manual or the forum I thought I ask.
Currently I have a sprite with event:
-lerp size,
-lerp opacity,
-if size = something -> lerp to different size and opacity
It's all good but I start to think, what if there's 100 objects like that. Lerping different values at same time.
Does using an animations instead of that would be more efficient at runtime?
In example, rather than
+Mouse: On left button Clicked on "Sprite"
- Sprite: Set width to lerp(self.Width,100,5*dt)
- Sprite: Set opacity to lerp(self.Opacity,0,5*dt)
- and so on...
do:
+Mouse: On left button Clicked on "Sprite"
- Sprite: Set animation to "On Click"
I'm aware that changing lerp to animations will increase significantly files size in the project due to adding more images to sprite required for animation. But let's not take memory into account and focus on performace only.