prime31/GoKit — pull request #38 by jpsarda (2013-09-30 23:07:40+00:00)
Title: Fix to ArgumentOutOfRangeException in handleUpdateOfType

In Go.handleUpdateOfType, if you remove/destroy a tween B in the onComplete method of a tween A, you sometimes get a ArgumentOutOfRangeException on the line 'var t = _tweens[i];'.
And I suppose that sometimes you don't get the Exception but you skip a tween.update() in the loop. Actually that might also be the reason of the issue I submitted and fixed here about the last tween of a tween chain not being always called ( https://github.com/prime31/GoKit/pull/36 ).

The fix I submitted here is to not remove immediately the tween when you call destroy() on it. It will be removed in the main loop in the Go class.