add live select pannel
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class LiveCharacterSelect : MonoBehaviour
|
||||
{
|
||||
public int CharaId;
|
||||
public string CostumeId;
|
||||
public Image CharaImage;
|
||||
public Image BackGroundImage;
|
||||
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(int charaId, string costumeId,Sprite charaSprite, Sprite costumeSprite)
|
||||
{
|
||||
CharaId = charaId;
|
||||
CostumeId = costumeId;
|
||||
CharaImage.sprite = charaSprite;
|
||||
BackGroundImage.enabled = true;
|
||||
BackGroundImage.sprite = charaSprite;
|
||||
CostumeImage.sprite = costumeSprite;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c73dbc71d1114ee4d9faf37a28216671
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user