Added editable stage lengths

This commit is contained in:
AbstractConcept 2022-09-18 00:01:12 -05:00
parent 8523abf957
commit d2ca61c61c
194 changed files with 820 additions and 269 deletions

View file

@ -54,5 +54,14 @@ namespace RimWorldAnimationStudio
KeyframeSlider keyframeSlider = GetComponentsInChildren<KeyframeSlider>().FirstOrDefault(x => x.keyframeID == keyframeID);
Destroy(keyframeSlider?.gameObject);
}
public void Update()
{
if (Workspace.actorID == actorID)
{ GetComponent<Image>().color = Constants.ColorGoldYellow; }
else
{ GetComponent<Image>().color = Constants.ColorGrey; }
}
}
}

View file

@ -32,7 +32,7 @@ namespace RimWorldAnimationStudio
this.keyframeID = keyframeID;
PawnKeyframe keyframe = Workspace.Instance.GetPawnKeyframe(actorID, keyframeID);
maxValue = Workspace.animationClipWindowSize;
maxValue = Workspace.StageWindowSize;
value = keyframe.atTick.Value;
OnValueChanged();
@ -61,7 +61,7 @@ namespace RimWorldAnimationStudio
for (int i = 0; i < Mathf.Max(nGhosts, ghostSliders.childCount); i++)
{
if ((i - 1) * clip.duration + keyframe.atTick <= Workspace.animationClipWindowSize)
if ((i - 1) * clip.duration + keyframe.atTick <= Workspace.StageWindowSize)
{
if (ghostSliders.childCount <= i)
{ Instantiate(ghostSliderPrefab, ghostSliders); }
@ -91,7 +91,7 @@ namespace RimWorldAnimationStudio
if (clip.duration <= 1)
{ return 0; }
return Math.Min(Mathf.CeilToInt((float)Workspace.animationClipWindowSize / clip.duration), maxGhosts);
return Math.Min(Mathf.CeilToInt((float)Workspace.StageWindowSize / clip.duration), maxGhosts);
}
public void OnPointerClick(PointerEventData eventData)