From b91386dfc9b559210f48b6a1145807706303fd1c Mon Sep 17 00:00:00 2001 From: gamer-jp <64856190+gamer-jp@users.noreply.github.com> Date: Tue, 27 Sep 2022 00:13:14 +0900 Subject: [PATCH] Added skill cut-in animation to animation list --- Assets/Scripts/UmaViewerUI.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Assets/Scripts/UmaViewerUI.cs b/Assets/Scripts/UmaViewerUI.cs index 9377869..3ce9816 100644 --- a/Assets/Scripts/UmaViewerUI.cs +++ b/Assets/Scripts/UmaViewerUI.cs @@ -381,6 +381,8 @@ public class UmaViewerUI : MonoBehaviour } } else + { + //Common animations foreach (var entry in filteredList.Where(a => a.Name.Contains($"chara/chr{umaId}"))) { var entryInstance = entry; @@ -391,6 +393,19 @@ public class UmaViewerUI : MonoBehaviour Builder.LoadAsset(entryInstance); }); } + + //Skill animations + foreach (var entry in filteredList.Where(a => a.Name.Contains($"card/body/crd{umaId}"))) + { + var entryInstance = entry; + var container = Instantiate(UmaContainerPrefab, animationList.content).GetComponent(); + container.Name.text = container.name = Path.GetFileName(entry.Name); + container.Button.onClick.AddListener(() => { + HighlightChildImage(animationList.content, container.GetComponent()); + Builder.LoadAsset(entryInstance); + }); + } + } } /// Toggles one object ON and all others from UI.TogglablePanels list OFF