31 lines
897 B
C#
31 lines
897 B
C#
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<PawnAnimationClip> animationClips = new List<PawnAnimationClip>();
|
|
|
|
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; }
|
|
}
|
|
}
|
|
}
|
|
}
|