mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Keyframe stretching plus appendage manipulation
This commit is contained in:
parent
18c0473f39
commit
1af7f41d63
427 changed files with 7003 additions and 1147 deletions
24
Assets/Scripts/GUI/QuiverToggle.cs
Normal file
24
Assets/Scripts/GUI/QuiverToggle.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
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; }
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue