mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
30 lines
646 B
C#
30 lines
646 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace RimWorldAnimationStudio
|
|
{
|
|
public class SelectActorLayerButton : MonoBehaviour
|
|
{
|
|
private Text text;
|
|
|
|
public void Start()
|
|
{
|
|
text = GetComponentInChildren<Text>();
|
|
}
|
|
|
|
void Update()
|
|
{
|
|
if (Workspace.animationDef == null) return;
|
|
|
|
PawnAnimationClip clip = Workspace.GetCurrentPawnAnimationClip();
|
|
|
|
if (clip != null)
|
|
{ text.text = clip.Layer; }
|
|
|
|
else
|
|
{ text.text = "Pawn"; }
|
|
}
|
|
}
|
|
}
|