johnatm / itween

Automatically exported from code.google.com/p/itween
1 stars 2 forks source link

Using EaseType.Punch can produce a NullReferenceException #136

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
1. Set up a MoveTo tween with an "easetype" property of "punch"
2. Execute the tween

You'll get a NullReferenceException at iTween.cs:4205 which is this line in 
ApplyMoveToTargets():

vector3s[2].x = ease(vector3s[0].x,vector3s[1].x,percentage);

The "ease" variable has not been set, because EaseType.Punch is not present in 
the switch in GetEasingFunction() and therefore is silently left null.

Original issue reported on code.google.com by jsutp...@gmail.com on 23 Mar 2014 at 7:04