-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDOTweenSequencer.cs
39 lines (30 loc) · 1.25 KB
/
DOTweenSequencer.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using DG.Tweening;
namespace TinyMatter.Core {
public class DOTweenSequencer : ISequenceable {
private readonly Sequence sequence;
public DOTweenSequencer(Sequence sequence) {
this.sequence = sequence;
}
public DOTweenSequencer() {
this.sequence = DOTween.Sequence();
}
public ISequenceable AppendCallback(TweenCallback callback) {
return new DOTweenSequencer(sequence.AppendCallback(callback));
}
public ISequenceable AppendInterval(float interval) {
return new DOTweenSequencer(sequence.AppendInterval(interval));
}
public ISequenceable PrependCallback(TweenCallback callback) {
return new DOTweenSequencer(sequence.PrependCallback(callback));
}
public ISequenceable InsertCallback(float atPosition, TweenCallback callback) {
return new DOTweenSequencer(sequence.InsertCallback(atPosition, callback));
}
public ISequenceable OnComplete(TweenCallback action) {
return new DOTweenSequencer(sequence.OnComplete(action));
}
public ISequenceable Append(Tween t) {
return new DOTweenSequencer(sequence.Append(t));
}
}
}