2022-09-13 05:36:34 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Xml;
|
|
|
|
|
using System.Xml.Serialization;
|
|
|
|
|
|
|
|
|
|
namespace RimWorldAnimationStudio
|
|
|
|
|
{
|
|
|
|
|
public class AnimationDef
|
|
|
|
|
{
|
|
|
|
|
public string defName = "Undefined";
|
|
|
|
|
public string label = "Undefined";
|
|
|
|
|
public bool sounds = false;
|
2022-09-14 05:25:58 +00:00
|
|
|
|
[XmlIgnore] public int animationTimeTicks = 0;
|
|
|
|
|
[XmlArray("sexTypes"), XmlArrayItem("li")] public List<string> sexTypes = new List<string>();
|
|
|
|
|
[XmlArray("interactionDefTypes"), XmlArrayItem("li")] public List<string> interactionDefTypes = new List<string>();
|
|
|
|
|
[XmlArray("actors"), XmlArrayItem("li")] public List<Actor> actors = new List<Actor>();
|
|
|
|
|
[XmlArray("animationStages"), XmlArrayItem("li")] public List<AnimationStage> animationStages = new List<AnimationStage>();
|
2022-09-13 05:36:34 +00:00
|
|
|
|
|
|
|
|
|
public void Initialize()
|
|
|
|
|
{
|
|
|
|
|
animationTimeTicks = 0;
|
|
|
|
|
|
|
|
|
|
foreach (AnimationStage stage in animationStages)
|
|
|
|
|
{
|
|
|
|
|
stage.Initialize();
|
|
|
|
|
animationTimeTicks += stage.playTimeTicks;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|