mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
28 lines
737 B
C#
28 lines
737 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace RimWorldAnimationStudio
|
|
{
|
|
public class SexPropManager : MonoBehaviour
|
|
{
|
|
public List<SexProp> sexProps = new List<SexProp>();
|
|
public Dropdown sexPropDropdown;
|
|
|
|
private SpriteRenderer spriteRenderer;
|
|
|
|
public void OnEnable()
|
|
{
|
|
spriteRenderer = GetComponent<SpriteRenderer>();
|
|
|
|
foreach (SexProp sexProp in sexProps)
|
|
{ sexPropDropdown.options.Add(new Dropdown.OptionData(sexProp.label)); }
|
|
}
|
|
|
|
public void OnOptionChanged()
|
|
{
|
|
spriteRenderer.sprite = sexProps[sexPropDropdown.value].sprite;
|
|
}
|
|
}
|
|
}
|