void onTweenEnded(Entity e, TweenComponent tweenComponent, Tween tween) { e.AddCallOnFrameEnd((ent) => { tweenComponent.RemoveTween(tween); if (tweenComponent.tweens.Count == 0) e.RemoveTween(); if (tween.OnComplete != null) tween.OnComplete(ent); }); }