Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
UIAnimeGroup.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2using UnityEngine;
3using UnityEngine.Events;
4
5public class UIAnimeGroup : UIAnime
6{
7 public List<AnimeItem> animes = new List<AnimeItem>();
8
9 public override void Play(AnimePhase phase, UnityAction onComplete = null)
10 {
11 bool flag = false;
12 foreach (AnimeItem anime in animes)
13 {
14 if (flag)
15 {
16 anime.Play(phase);
17 continue;
18 }
19 anime.Play(phase, delegate
20 {
21 OnComplete(onComplete);
22 });
23 flag = true;
24 }
25 base.Play(phase, onComplete);
26 }
27
28 public UIAnimeGroup AddAnime(Transform target, Anime intro, Anime outro = null, Anime loop = null)
29 {
30 animes.Add(new AnimeItem
31 {
32 target = target,
33 intro = intro,
34 outro = outro,
35 loop = loop
36 });
37 return this;
38 }
39
40 public override bool Has(AnimePhase phase)
41 {
42 foreach (AnimeItem anime in animes)
43 {
44 if ((phase == AnimePhase.Intro && (bool)anime.intro) || (phase == AnimePhase.Outro && (bool)anime.outro))
45 {
46 return true;
47 }
48 }
49 return false;
50 }
51}
AnimePhase
Definition: AnimePhase.cs:2
Anime outro
Definition: AnimeItem.cs:10
void Play(AnimePhase phase, UnityAction onComplete=null)
Definition: AnimeItem.cs:18
Anime intro
Definition: AnimeItem.cs:8
Definition: Anime.cs:6
override bool Has(AnimePhase phase)
Definition: UIAnimeGroup.cs:40
UIAnimeGroup AddAnime(Transform target, Anime intro, Anime outro=null, Anime loop=null)
Definition: UIAnimeGroup.cs:28
List< AnimeItem > animes
Definition: UIAnimeGroup.cs:7
override void Play(AnimePhase phase, UnityAction onComplete=null)
Definition: UIAnimeGroup.cs:9
void OnComplete(UnityAction onComplete)
Definition: UIAnime.cs:17