Bug fixes (issues #1, 2, 3 and 6)

This commit is contained in:
AbstractConcept 2022-10-02 00:42:07 -05:00
parent 6b44db7400
commit 518a912ef1
156 changed files with 352 additions and 625 deletions

View file

@ -77,14 +77,16 @@ namespace RimWorldAnimationStudio
if (siblingIndex != null && siblingCount != null && MoveAnimationTimeline(siblingIndex.Value, delta))
{
//siblingIndex = Mathf.Clamp(siblingCount.Value + delta, 0, siblingCount.Value - 1);
transform.SetSiblingIndex(transform.GetSiblingIndex() + delta);
//transform.SetSiblingIndex(transform.GetSiblingIndex() + delta);
AnimationController.Instance.ResetAnimationTimeline();
AnimationController.Instance.InitializeAnimationTimeline();
}
}
public bool MoveAnimationTimeline(int startIndex, int delta)
{
if (startIndex + delta < 0 || startIndex + delta >= Workspace.animationDef.animationStages[Workspace.stageID].animationClips.Count)
{ return false; }
{ Debug.Log("Cannot move animation timeline - movement would exceed bounds"); return false; }
Actor actor = Workspace.animationDef.actors[startIndex];
Workspace.animationDef.actors[startIndex] = Workspace.animationDef.actors[startIndex + delta];