2022-09-20 06:03:55 +00:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
namespace RimWorldAnimationStudio
|
|
|
|
|
{
|
|
|
|
|
public class QuiverToggle : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
public void Update()
|
|
|
|
|
{
|
|
|
|
|
PawnKeyframe keyframe = Workspace.Instance.GetCurrentPawnKeyframe();
|
|
|
|
|
GetComponent<Toggle>().isOn = keyframe != null && keyframe.quiver.HasValue && keyframe.quiver.Value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void OnValueChanged()
|
|
|
|
|
{
|
|
|
|
|
PawnKeyframe keyframe = Workspace.Instance.GetCurrentPawnKeyframe();
|
|
|
|
|
|
|
|
|
|
if (keyframe != null)
|
|
|
|
|
{ keyframe.quiver = GetComponent<Toggle>().isOn; }
|
2022-09-21 05:40:58 +00:00
|
|
|
|
|
|
|
|
|
Workspace.Instance.RecordEvent("Actor quiver");
|
2022-09-20 06:03:55 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|