mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Stage and anim lengths display
This commit is contained in:
parent
ab5a2a4c02
commit
cc28ac4bd4
174 changed files with 604 additions and 245 deletions
|
@ -16,7 +16,9 @@ namespace RimWorldAnimationStudio
|
|||
[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>();
|
||||
[XmlIgnore] public int animationTimeTicks = 0;
|
||||
|
||||
[XmlIgnore] public int animationTimeTicks { get { return animationStages.Sum(x => x.playTimeTicks); } }
|
||||
[XmlIgnore] public int animationTimeTicksQuick { get { return animationStages.Sum(x => x.playTimeTicksQuick); } }
|
||||
|
||||
public bool ShouldSerializesexTypes() { return sexTypes.NotNullOrEmpty(); }
|
||||
public bool ShouldSerializeinteractionDefTypes() { return interactionDefTypes.NotNullOrEmpty(); }
|
||||
|
@ -25,13 +27,8 @@ namespace RimWorldAnimationStudio
|
|||
|
||||
public void Initialize()
|
||||
{
|
||||
animationTimeTicks = 0;
|
||||
|
||||
foreach (AnimationStage stage in animationStages)
|
||||
{
|
||||
stage.Initialize();
|
||||
animationTimeTicks += stage.playTimeTicks;
|
||||
}
|
||||
{ stage.Initialize(); }
|
||||
}
|
||||
|
||||
public void ValidateData()
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace RimWorldAnimationStudio
|
|||
public string stageName = "NewStage";
|
||||
public int stageIndex = 0;
|
||||
public int playTimeTicks = 0;
|
||||
public int playTimeTicksQuick = -1;
|
||||
public int playTimeTicksQuick = 0;
|
||||
public bool isLooping = false;
|
||||
|
||||
[XmlArray("animationClips"), XmlArrayItem("li")] public List<PawnAnimationClip> animationClips = new List<PawnAnimationClip>();
|
||||
|
@ -50,7 +50,7 @@ namespace RimWorldAnimationStudio
|
|||
}
|
||||
|
||||
Initialize();
|
||||
|
||||
playTimeTicksQuick = playTimeTicks;
|
||||
Workspace.animationDef.animationStages.Add(this);
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue