I'd like to be able to access the easing equations directly.
Of course I could just copy & paste the code in my own class, but that's code
bloat.
Could you put them in a struct? I think making them public static would also be
more memory efficient: not every iTween instance needs its own easing
equations, they can all share the same methods.
--
I've modified and included your code but I haven't tested for speed.
Here's a useful example of using equations directly:
public float CalculateDamage(Enemy target) {
float dist = Vector3.Distance(transform.position, target.transform.position);
float damage = EasingEquations.easeOutQuart(hitStats.splashDamage, hitStats.minDamage, dist/hitStats.splashRadius);
return damage;
}
Original issue reported on code.google.com by wttewaall on 16 Jul 2011 at 3:33
Original issue reported on code.google.com by
wttewaall
on 16 Jul 2011 at 3:33Attachments: