add basic ear animation

This commit is contained in:
CroakFang
2023-04-07 23:18:53 +08:00
parent 3714ea45e1
commit 698e689c3b
2 changed files with 38 additions and 8 deletions
+33 -8
View File
@@ -217,22 +217,30 @@ public class UmaViewerUI : MonoBehaviour
public void LoadModelPanels()
{
var container1 = Instantiate(UmaContainerPrefab, AnimationSetList.content).GetComponent<UmaUIContainer>();
container1.Name = container1.name = "Generic";
container1.Button.onClick.AddListener(() =>
var containerG = Instantiate(UmaContainerPrefab, AnimationSetList.content).GetComponent<UmaUIContainer>();
containerG.Name = containerG.name = "Generic";
containerG.Button.onClick.AddListener(() =>
{
HighlightChildImage(AnimationSetList.content, container1);
HighlightChildImage(AnimationSetList.content, containerG);
ListAnimations(-1, false);
});
var container2 = Instantiate(UmaContainerPrefab, AnimationSetList.content).GetComponent<UmaUIContainer>();
container2.Name = container2.name = "Tail";
container2.Button.onClick.AddListener(() =>
var containerT = Instantiate(UmaContainerPrefab, AnimationSetList.content).GetComponent<UmaUIContainer>();
containerT.Name = containerT.name = "Tail";
containerT.Button.onClick.AddListener(() =>
{
HighlightChildImage(AnimationSetList.content, container2);
HighlightChildImage(AnimationSetList.content, containerT);
ListAnimations(-2, false);
});
var containerE = Instantiate(UmaContainerPrefab, AnimationSetList.content).GetComponent<UmaUIContainer>();
containerE.Name = containerE.name = "Ear";
containerE.Button.onClick.AddListener(() =>
{
HighlightChildImage(AnimationSetList.content, containerE);
ListAnimations(-3, false);
});
foreach (var chara in Main.Characters.OrderBy(c => c.Id))
{
var charaInstance = chara;
@@ -794,6 +802,23 @@ public class UmaViewerUI : MonoBehaviour
}
pageManager.ResetCtrl();
}
else if (umaId == -3)
{
foreach (var entry in Main.AbMotions.Where(a => a.Name.Contains($"type00_ear")&&!a.Name.EndsWith("driven") && !a.Name.Contains("touch")))
{
var entryInstance = entry;
var container = Instantiate(UmaContainerPrefab, animationList.content).GetComponent<UmaUIContainer>();
container.Name = container.name = Path.GetFileName(entry.Name);
container.FontSize = 20;
container.Button.onClick.AddListener(() =>
{
HighlightChildImage(animationList.content, container);
Builder.LoadAsset(entryInstance);
LoadedAnimation();
});
}
pageManager.ResetCtrl();
}
else
{
//Common animations