// update cache (optimized) public override void updateCache(ITarget target) { base.updateCache(target); for (int i = 0; i < keys.Count; i++) { ScaleKey key = keys[i] as ScaleKey; key.GeneratePath(this, i); //invalidate some keys in between if (key.path != null) { int endInd = i + key.keyCount - 1; if (endInd < keys.Count - 1 || key.interp != keys[endInd].interp) //don't count the last element if there are more keys ahead { endInd--; } for (int j = i + 1; j <= endInd; j++) { var _key = keys[j] as ScaleKey; _key.interp = key.interp; _key.easeType = key.easeType; _key.Invalidate(); } i = endInd; } } }
// update cache (optimized) public override void updateCache(ITarget target) { base.updateCache(target); for (int i = 0; i < keys.Count; i++) { ScaleKey key = keys[i] as ScaleKey; key.version = version; key.GeneratePath(this, i); key.ClearCache(); //invalidate some keys in between if (key.path.Length > 1) { int endInd = i + key.path.Length - 1; if (endInd < keys.Count - 1 || key.interp != keys[endInd].interp) //don't count the last element if there are more keys ahead { endInd--; } for (int j = i + 1; j <= endInd; j++) { var _key = keys[j] as ScaleKey; _key.version = version; _key.interp = key.interp; _key.easeType = key.easeType; _key.endFrame = -1; _key.path = new Vector3[0]; } i = endInd; } } }