using System.Collections.Generic; using System.Xml; using System.Xml.Serialization; namespace RimWorldAnimationStudio { public class AnimationStage { public string stageName = "default"; public int stageIndex = 0; public int playTimeTicks = 0; public int playTimeTicksQuick = -1; public bool isLooping = true; [XmlArray("animationClips"), XmlArrayItem("li")] public List animationClips = new List(); public void Initialize() { foreach (AnimationClip clip in animationClips) { clip.BuildSimpleCurves(); //select playTimeTicks as longest playtime of all the animations if (clip.duration > playTimeTicks) { playTimeTicks = clip.duration; } } } } }