void Update ()
{
if (disableWhenFinished != DisableCondition.DoNotDisable && mTweens != null)
{
bool isFinished = true;
bool properDirection = true;
for (int i = 0, imax = mTweens.Length; i < imax; ++i)
{
UITweener tw = mTweens[i];
if (tw.tweenGroup == tweenGroup) // CHECK FOR TWEENGROUP!
{
if (tw.enabled)
{
isFinished = false;
break;
}
else if ((int)tw.direction != (int)disableWhenFinished)
{
properDirection = false;
}
}
}
if (isFinished)
{
if (properDirection) NGUITools.SetActive(tweenTarget, false);
mTweens = null;
}
}
}