mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Extra keybinds
This commit is contained in:
parent
e210923733
commit
c3c0a05ac0
139 changed files with 586 additions and 233 deletions
|
@ -50,7 +50,7 @@ namespace RimWorldAnimationStudio
|
|||
if (keyframe.atTick.HasValue)
|
||||
{
|
||||
if (keyframe.HasValidKeyframeID() == false)
|
||||
{ keyframe.GenerateKeyframeID(); }
|
||||
{ keyframe.GenerateKeyframeID(Workspace.animationDef.animationStages[Workspace.stageID].animationClips.IndexOf(this)); }
|
||||
|
||||
BodyAngle.Add((float)keyframe.atTick / (float)duration, keyframe.bodyAngle, true);
|
||||
HeadAngle.Add((float)keyframe.atTick / (float)duration, keyframe.headAngle, true);
|
||||
|
|
|
@ -19,6 +19,7 @@ namespace RimWorldAnimationStudio
|
|||
public float genitalAngle;
|
||||
public bool? quiver;
|
||||
[XmlIgnore] public int keyframeID;
|
||||
[XmlIgnore] public int actorID = -1;
|
||||
|
||||
public bool ShouldSerializegenitalAngle() { return genitalAngle != 0; }
|
||||
public bool ShouldSerializequiver() { return quiver != null; }
|
||||
|
@ -28,13 +29,14 @@ namespace RimWorldAnimationStudio
|
|||
soundEffect = Tags.soundDefs.Concat(CustomTags.soundDefs).Contains(soundEffect) ? soundEffect : null;
|
||||
}
|
||||
|
||||
public void GenerateKeyframeID()
|
||||
{
|
||||
public void GenerateKeyframeID(int actorID)
|
||||
{
|
||||
this.actorID = actorID;
|
||||
int _keyframeID = Random.Range(100000, 1000000);
|
||||
|
||||
if (Workspace.animationDef.animationStages.Any(x => x.animationClips.Any(y => y.keyframes.Any(z => z.keyframeID == _keyframeID))))
|
||||
{
|
||||
GenerateKeyframeID();
|
||||
GenerateKeyframeID(actorID);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue