2022-09-20 06:03:55 +00:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
namespace RimWorldAnimationStudio
|
|
|
|
|
{
|
|
|
|
|
public class AddSoundDefButton : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
private Text text;
|
|
|
|
|
|
|
|
|
|
public void Start()
|
|
|
|
|
{
|
|
|
|
|
text = GetComponentInChildren<Text>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Update()
|
|
|
|
|
{
|
2022-10-08 02:52:27 +00:00
|
|
|
|
PawnKeyframe keyframe = Workspace.Instance.GetCurrentOrPreviousKeyframe(Workspace.actorID);
|
2022-09-20 06:03:55 +00:00
|
|
|
|
|
|
|
|
|
if (keyframe != null)
|
|
|
|
|
{ text.text = keyframe.soundEffect == null || keyframe.soundEffect == "" ? "None" : keyframe.soundEffect; }
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
{ text.text = "None"; }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|