rimworld-animation-studio/Assets/Scripts/AnimationComponents/KeyFrames/PawnKeyframe.cs

36 lines
971 B
C#
Raw Normal View History

2022-09-13 05:36:34 +00:00
using System.Collections.Generic;
using System.Xml;
using System.Xml.Serialization;
using UnityEngine;
2022-09-13 05:36:34 +00:00
namespace RimWorldAnimationStudio
{
public class PawnKeyframe : Keyframe
{
public float bodyAngle;
public float headAngle;
public float headBob;
public float bodyOffsetX;
public float bodyOffsetZ;
public float headFacing;
public float bodyFacing;
2022-09-13 05:36:34 +00:00
public float? genitalAngle;
public bool? quiver;
public bool ShouldSerializegenitalAngle() { return genitalAngle != null; }
public bool ShouldSerializequiver() { return quiver != null; }
[XmlIgnore] public int keyframeID;
public void GenerateKeyframeID()
{
keyframeID = Random.Range(100000, 1000000);
Debug.Log("Generated ID: " + keyframeID);
}
public bool HasValidKeyframeID()
{ return keyframeID >= 100000 && keyframeID < 1000000; }
2022-09-13 05:36:34 +00:00
}
}