3b2bae40cd
* merge (#71) * Bug fix, improved UI layout and live vocals * Bug Fixes, New Live Compatibility --------- Co-authored-by: CroakFang <1605296300@qq.com> * recovered shader functions * Fixed texture loading for costume 0015 --------- Co-authored-by: CroakFang <1605296300@qq.com>
30 lines
772 B
C#
30 lines
772 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class LiveCharacterSelect : MonoBehaviour
|
|
{
|
|
public CharaEntry CharaEntry;
|
|
public string CostumeId;
|
|
public Image CharaImage;
|
|
public Image CostumeImage;
|
|
public Text IndexText;
|
|
|
|
public void SelectChara(UmaViewerUI ui)
|
|
{
|
|
if (!ui) return;
|
|
ui.CurrentSeletChara = this;
|
|
if (!ui.SelectCharacterPannel.activeInHierarchy)
|
|
ui.ToggleUIPanel(ui.SelectCharacterPannel);
|
|
}
|
|
|
|
public void SetValue(CharaEntry charaentry, string costumeId, Sprite costumeSprite)
|
|
{
|
|
CharaEntry = charaentry;
|
|
CostumeId = costumeId;
|
|
CharaImage.enabled = true;
|
|
CharaImage.sprite = charaentry.Icon;
|
|
CostumeImage.sprite = costumeSprite;
|
|
}
|
|
}
|
|
|