Sex props plus quiver visuals

This commit is contained in:
AbstractConcept 2022-10-07 21:52:27 -05:00
parent f275ed90ae
commit 4a2905c7fc
152 changed files with 1985 additions and 184 deletions

View file

@ -16,7 +16,7 @@ namespace RimWorldAnimationStudio
void Update()
{
PawnKeyframe keyframe = Workspace.Instance.GetCurrentPawnKeyframe();
PawnKeyframe keyframe = Workspace.Instance.GetCurrentOrPreviousKeyframe(Workspace.actorID);
if (keyframe != null)
{ text.text = keyframe.soundEffect == null || keyframe.soundEffect == "" ? "None" : keyframe.soundEffect; }

View file

@ -28,10 +28,10 @@ namespace RimWorldAnimationStudio
_optionToggle.Find("Text").GetComponent<Text>().text = tag;
Toggle toggleComp = _optionToggle.GetComponent<Toggle>();
toggleComp.isOn = Workspace.Instance.GetCurrentPawnKeyframe()?.soundEffect == tag;
toggleComp.isOn = Workspace.Instance.GetCurrentOrPreviousKeyframe(Workspace.actorID)?.soundEffect == tag;
toggleComp.onValueChanged.AddListener(delegate
{
PawnKeyframe keyframe = Workspace.Instance.GetCurrentPawnKeyframe();
PawnKeyframe keyframe = Workspace.Instance.GetCurrentOrPreviousKeyframe(Workspace.actorID);
if (keyframe != null)
{ keyframe.soundEffect = tag; }

View file

@ -9,13 +9,13 @@ namespace RimWorldAnimationStudio
{
public void Update()
{
PawnKeyframe keyframe = Workspace.Instance.GetCurrentPawnKeyframe();
PawnKeyframe keyframe = Workspace.Instance.GetCurrentOrPreviousKeyframe(Workspace.actorID);
GetComponent<Toggle>().isOn = keyframe != null && keyframe.quiver.HasValue && keyframe.quiver.Value;
}
public void OnValueChanged()
{
PawnKeyframe keyframe = Workspace.Instance.GetCurrentPawnKeyframe();
PawnKeyframe keyframe = Workspace.Instance.GetCurrentOrPreviousKeyframe(Workspace.actorID);
if (keyframe != null)
{ keyframe.quiver = GetComponent<Toggle>().isOn; }