2026-04-22 모듈러 에셋 포함

This commit is contained in:
2026-04-22 10:25:40 +09:00
parent abaf994ebf
commit 7bdb7b7cd1
2466 changed files with 208897 additions and 4 deletions

View File

@@ -0,0 +1,47 @@
using UnityEngine;
using UnityEngine.UI;
namespace Bozo.AnimeCharacters
{
public class OutfitSelector : MonoBehaviour
{
public Image icon;
private Outfit outfit;
private CharacterCreator characterCreator;
private Button button;
public void Init(Outfit outfit, CharacterCreator characterCreator)
{
//icon = GetComponentInChildren<Image>();
button = GetComponentInChildren<Button>();
button.onClick.AddListener(OnSelect);
this.outfit = outfit;
this.characterCreator = characterCreator;
icon.overrideSprite = this.outfit.OutfitIcon;
}
private void OnSelect()
{
characterCreator.SetOutfit(outfit);
}
public void SetVisable(string type)
{
if (outfit.Type == null)
{
gameObject.SetActive(false);
Debug.LogWarning(outfit.name + " is missing an outfitType and will not show in the character creator");
return;
}
if(outfit.Type.name == type)
{
gameObject.SetActive(true);
}
else
{
gameObject.SetActive(false);
}
}
}
}