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-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
|
|
|
|
{ text.text = keyframe.SoundEffect == null || keyframe.SoundEffect == "" ? "None" : keyframe.SoundEffect; }
|
2022-09-20 06:03:55 +00:00
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
{ text.text = "None"; }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|