List<EventDelegate> temp = null;
protected virtual void CallDelegate( List<EventDelegate> e )
{
if (current == null)
{
UITweener before = current;
current = this;
if (e != null)
{
temp = e;
e
= new List
<EventDelegate
>();
// Notify the listener delegates
EventDelegate.Execute(temp);
// Re-add the previous persistent delegates
for (int i = 0; i < temp.Count; ++i)
{
EventDelegate ed = temp[i];
if (ed != null && !ed.oneShot) EventDelegate.Add(e, ed, ed.oneShot);
}
temp = null;
}
// Deprecated legacy functionality support
if (eventReceiver != null && !string.IsNullOrEmpty(callWhenFinished))
eventReceiver.SendMessage(callWhenFinished, this, SendMessageOptions.DontRequireReceiver);
current = before;
}
}