mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
28 lines
671 B
C#
28 lines
671 B
C#
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()
|
|
{
|
|
PawnKeyframe keyframe = Workspace.Instance.GetCurrentPawnKeyframe();
|
|
|
|
if (keyframe != null)
|
|
{ text.text = keyframe.soundEffect == null || keyframe.soundEffect == "" ? "None" : keyframe.soundEffect; }
|
|
|
|
else
|
|
{ text.text = "None"; }
|
|
}
|
|
}
|
|
}
|