Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
AnimeTween Class Reference
Inheritance diagram for AnimeTween:
Anime

Public Member Functions

void Refresh ()
 
void PlayDebug ()
 
void Kill ()
 
void Rewind ()
 
void Play ()
 
override Tween Play (Transform trans, UnityAction onComplete=null, float duration=-1f, float delay=0f)
 
virtual Tween Play (Transform trans, UnityAction onComplete=null, float duration=-1f, float delay=0f)
 

Public Attributes

bool autoPlay
 
bool targetParent = true
 

Properties

Transform target [get]
 

Private Member Functions

void Awake ()
 

Private Attributes

List< DOTweenAnimation > animes = new List<DOTweenAnimation>()
 

Detailed Description

Definition at line 7 of file AnimeTween.cs.

Member Function Documentation

◆ Awake()

void AnimeTween.Awake ( )
inlineprivate

Definition at line 27 of file AnimeTween.cs.

28 {
29 Refresh();
30 if (autoPlay)
31 {
32 Play(target);
33 }
34 }
void Play()
Definition: AnimeTween.cs:70
bool autoPlay
Definition: AnimeTween.cs:9
void Refresh()
Definition: AnimeTween.cs:36
Transform target
Definition: AnimeTween.cs:16

References autoPlay, Play(), Refresh(), and target.

◆ Kill()

void AnimeTween.Kill ( )
inline

Definition at line 51 of file AnimeTween.cs.

52 {
53 foreach (DOTweenAnimation anime in animes)
54 {
55 if (anime.tween != null)
56 {
57 anime.tween.Kill();
58 }
59 }
60 }
List< DOTweenAnimation > animes
Definition: AnimeTween.cs:13

References animes.

Referenced by Rewind().

◆ Play() [1/2]

void AnimeTween.Play ( )
inline

Definition at line 70 of file AnimeTween.cs.

71 {
72 Play(target);
73 }

References Play(), and target.

Referenced by Awake(), DramaProp.Enter(), DramaProp.Leave(), Play(), PlayDebug(), and Rewind().

◆ Play() [2/2]

override Tween AnimeTween.Play ( Transform  trans,
UnityAction  onComplete = null,
float  duration = -1f,
float  delay = 0f 
)
inlinevirtual

Reimplemented from Anime.

Definition at line 75 of file AnimeTween.cs.

76 {
77 if (animes.Count == 0)
78 {
79 Refresh();
80 }
81 bool flag = true;
82 Sequence sequence = DOTween.Sequence();
83 foreach (DOTweenAnimation anime in animes)
84 {
85 anime.target = trans;
86 if (flag && onComplete != null)
87 {
88 anime.CreateTween(onComplete, duration);
89 flag = false;
90 }
91 else
92 {
93 anime.CreateTween(null, duration);
94 }
95 if (delay != 0f)
96 {
97 anime.tween.SetDelay(anime.tween.Delay() + delay);
98 }
99 sequence.Join(anime.tween);
100 }
101 sequence.Play();
102 return sequence;
103 }

References animes, and Refresh().

◆ PlayDebug()

void AnimeTween.PlayDebug ( )
inline

Definition at line 45 of file AnimeTween.cs.

46 {
47 Refresh();
48 Play(target);
49 }

References Play(), Refresh(), and target.

◆ Refresh()

void AnimeTween.Refresh ( )
inline

Definition at line 36 of file AnimeTween.cs.

37 {
38 animes = GetComponents<DOTweenAnimation>().ToList();
39 foreach (DOTweenAnimation anime in animes)
40 {
41 anime.target = target;
42 }
43 }

References animes, and target.

Referenced by Awake(), Play(), and PlayDebug().

◆ Rewind()

void AnimeTween.Rewind ( )
inline

Definition at line 62 of file AnimeTween.cs.

63 {
64 Kill();
65 target.SetLocalScale(1f, 1f, 1f);
66 target.SetEulerAngles(0f, 0f, 0f);
67 Play(target);
68 }
void Kill()
Definition: AnimeTween.cs:51

References Kill(), Play(), and target.

Member Data Documentation

◆ animes

List<DOTweenAnimation> AnimeTween.animes = new List<DOTweenAnimation>()
private

Definition at line 13 of file AnimeTween.cs.

Referenced by Kill(), Play(), and Refresh().

◆ autoPlay

bool AnimeTween.autoPlay

Definition at line 9 of file AnimeTween.cs.

Referenced by Awake().

◆ targetParent

bool AnimeTween.targetParent = true

Definition at line 11 of file AnimeTween.cs.

Property Documentation

◆ target

Transform AnimeTween.target
get

Definition at line 15 of file AnimeTween.cs.

16 {
17 get
18 {
19 if (!targetParent)
20 {
21 return base.transform;
22 }
23 return base.transform.parent;
24 }
25 }
bool targetParent
Definition: AnimeTween.cs:11

Referenced by Awake(), Play(), PlayDebug(), Refresh(), and Rewind().


The documentation for this class was generated from the following file: