Keyframe stretching plus appendage manipulation

This commit is contained in:
AbstractConcept 2022-09-20 01:03:55 -05:00
parent 18c0473f39
commit 1af7f41d63
427 changed files with 7003 additions and 1147 deletions

View file

@ -14,6 +14,8 @@ namespace RimWorldAnimationStudio
public AnimationTimeline timeline;
public Transform ghostSliders;
public Slider ghostSliderPrefab;
public Image handleImage;
public GameObject soundIcon;
public int maxGhosts = 4;
public int actorID;
@ -131,17 +133,25 @@ namespace RimWorldAnimationStudio
{
base.Update();
if (Workspace.keyframeID == keyframeID && AnimationController.Instance.stageTick == keyframe.atTick.Value)
{ transform.FindDeepChild("Handle").GetComponent<Image>().color = Constants.ColorPurple; }
if (keyframe.atTick.HasValue && Workspace.keyframeID == keyframeID && AnimationController.Instance.stageTick == keyframe.atTick.Value)
{ handleImage.color = Constants.ColorPurple; }
else if (Workspace.keyframeID == keyframeID)
{ transform.FindDeepChild("Handle").GetComponent<Image>().color = Constants.ColorCyan; }
{ handleImage.color = Constants.ColorCyan; }
else if (AnimationController.Instance.stageTick == keyframe.atTick.Value)
{ transform.FindDeepChild("Handle").GetComponent<Image>().color = Constants.ColorPink; }
else if (keyframe.atTick.HasValue && AnimationController.Instance.stageTick == keyframe.atTick.Value)
{ handleImage.color = Constants.ColorPink; }
else
{ transform.FindDeepChild("Handle").GetComponent<Image>().color = Constants.ColorWhite; }
{ handleImage.color = Constants.ColorWhite; }
string soundDef = Workspace.Instance.GetPawnKeyframe(actorID, keyframeID).soundEffect;
if (soundDef != null && soundDef != "" && soundDef != "None")
{ soundIcon.SetActive(true); }
else
{ soundIcon.SetActive(false); }
}
}
}