private UITween EnQueue(UITweenInstanceMembers inst, UITweenQueueTypes type, Action completeAction) { List <UITweenInstanceMembers> lastQueue = null; if (type.Equals(UITweenQueueTypes.Sequential)) { lastQueue = AddQueueCompleteHandler(); m_TweenQueue.Add(lastQueue); } else // synchronous { if (m_TweenQueue.Count > 0) { lastQueue = m_TweenQueue[m_TweenQueue.Count - 1]; } else { lastQueue = new List <UITweenInstanceMembers>(); m_TweenQueue.Add(lastQueue); } } lock (lastQueue) { lastQueue.Add(inst); } if (completeAction != null) { CompleteAction = completeAction; } return(this); }
public UITween Queue(UITweenQueueTypes type, Action finalAction, object obj, float duration, Dictionary <string, float> args, EaseFunction ease, Action completeAction, Action updateAction) { var inst = new UITweenInstanceMembers(this, obj, duration, args, ease).OnCompleteAction(completeAction).OnUpdateAction(updateAction); return(EnQueue(inst, type, finalAction)); }
public UITween Queue(UITweenQueueTypes type, Action finalAction, object obj, float duration, Dictionary <string, float> args) { var inst = new UITweenInstanceMembers(this, obj, duration, args, TweenLinear.EaseNone); return(EnQueue(inst, type, finalAction)); }