mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Added editable stage lengths
This commit is contained in:
parent
8523abf957
commit
d2ca61c61c
194 changed files with 820 additions and 269 deletions
|
@ -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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue