1
0
mirror of https://github.com/Cardidi/dotween-upm-fork.git synced 2025-12-20 09:16:02 +08:00

Added check to prevent already sequenced tweens to be added to other sequences

This commit is contained in:
Daniele Giardini 2015-04-25 01:18:01 +02:00
parent e20889fae2
commit ff40e475e8
9 changed files with 4 additions and 4 deletions

View File

@ -402,7 +402,7 @@ namespace DG.Tweening
public static Sequence Append(this Sequence s, Tween t) public static Sequence Append(this Sequence s, Tween t)
{ {
if (s == null || !s.active || s.creationLocked) return s; if (s == null || !s.active || s.creationLocked) return s;
if (t == null || !t.active) return s; if (t == null || !t.active || t.isSequenced) return s;
Sequence.DoInsert(s, t, s.duration); Sequence.DoInsert(s, t, s.duration);
return s; return s;
@ -413,7 +413,7 @@ namespace DG.Tweening
public static Sequence Prepend(this Sequence s, Tween t) public static Sequence Prepend(this Sequence s, Tween t)
{ {
if (s == null || !s.active || s.creationLocked) return s; if (s == null || !s.active || s.creationLocked) return s;
if (t == null || !t.active) return s; if (t == null || !t.active || t.isSequenced) return s;
Sequence.DoPrepend(s, t); Sequence.DoPrepend(s, t);
return s; return s;
@ -423,7 +423,7 @@ namespace DG.Tweening
public static Sequence Join(this Sequence s, Tween t) public static Sequence Join(this Sequence s, Tween t)
{ {
if (s == null || !s.active || s.creationLocked) return s; if (s == null || !s.active || s.creationLocked) return s;
if (t == null || !t.active) return s; if (t == null || !t.active || t.isSequenced) return s;
Sequence.DoInsert(s, t, s.lastTweenInsertTime); Sequence.DoInsert(s, t, s.lastTweenInsertTime);
return s; return s;
@ -436,7 +436,7 @@ namespace DG.Tweening
public static Sequence Insert(this Sequence s, float atPosition, Tween t) public static Sequence Insert(this Sequence s, float atPosition, Tween t)
{ {
if (s == null || !s.active || s.creationLocked) return s; if (s == null || !s.active || s.creationLocked) return s;
if (t == null || !t.active) return s; if (t == null || !t.active || t.isSequenced) return s;
Sequence.DoInsert(s, t, atPosition); Sequence.DoInsert(s, t, atPosition);
return s; return s;

Binary file not shown.