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()
|
|
|
|
|
{
|
2022-10-27 05:56:04 +00:00
|
|
|
|
PawnKeyframe keyframe = Workspace.GetCurrentOrPreviousKeyframe(Workspace.ActorID);
|
|
|
|
|
GetComponent<Toggle>().isOn = keyframe != null && keyframe.Quiver;
|
2022-09-20 06:03:55 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void OnValueChanged()
|
|
|
|
|
{
|
2022-10-27 05:56:04 +00:00
|
|
|
|
PawnKeyframe keyframe = Workspace.GetCurrentOrPreviousKeyframe(Workspace.ActorID);
|
2022-09-20 06:03:55 +00:00
|
|
|
|
|
|
|
|
|
if (keyframe != null)
|
2022-10-27 05:56:04 +00:00
|
|
|
|
{ keyframe.Quiver = GetComponent<Toggle>().isOn; }
|
2022-09-21 05:40:58 +00:00
|
|
|
|
|
2022-10-27 05:56:04 +00:00
|
|
|
|
Workspace.RecordEvent("Actor quiver");
|
2022-09-20 06:03:55 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|