/// <summary> /// 把前面几个LateTween串起来,一个一个执行(参考cocos) /// </summary> /// <param name="n"></param> /// <returns></returns> public LateTween Sequence(int n) { if (n > _lst.Count) { return(this); //error } List <TweenBase> q = _lst.GetRange(_lst.Count - n, n); _lst = _lst.GetRange(0, _lst.Count - n); TweenSequence seq = new TweenSequence(q); AddTween(seq); return(this); }
public Tween Do() { if (_lst.Count <= 0) { return(this); } if (_lst.Count == 1) { _final = _lst[0]; } else { TweenSequence seq = new TweenSequence(_lst); seq.go = _go; seq.OnCreate(); _final = seq; } if (!_useScaleTime) { _final.OnBegin(Time.unscaledTime); } else { _final.OnBegin(Time.time); } if (_final.IsEnd()) { _final = null; if (Application.isPlaying) { Object.Destroy(this); } else { Object.DestroyImmediate(this); } } _lst.Clear(); _go = null; return(this); }
public LateTween Do() { if (_lst.Count <= 0) { return(this); } if (_lst.Count == 1) { _final = _lst[0]; } else { TweenSequence seq = new TweenSequence(_lst); seq.go = _go; seq.OnCreate(); _final = seq; } if (!_useScaleTime) { _final.OnBegin(Time.unscaledTime); } else { _final.OnBegin(Time.time); } if (_final.IsEnd()) { _final = null; } _lst.Clear(); _go = null; return(this); }