25 lines
631 B
C#
25 lines
631 B
C#
|
|
using System.Collections;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using UnityEngine;
|
|||
|
|
using UnityEngine.UI;
|
|||
|
|
|
|||
|
|
public class CustoMizeItem : MonoBehaviour
|
|||
|
|
{
|
|||
|
|
int indexThisResource;
|
|||
|
|
public void SetInfo(string nameCustomize, int thisIndex, Sprite thisSprite)
|
|||
|
|
{
|
|||
|
|
indexThisResource = thisIndex;
|
|||
|
|
|
|||
|
|
Text txtName = GetComponentInChildren<Text>();
|
|||
|
|
txtName.text = nameCustomize;
|
|||
|
|
|
|||
|
|
Image img = transform.Find("EditImg").GetComponent<Image>();
|
|||
|
|
img.sprite = thisSprite;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public void CustomizeThisItem()
|
|||
|
|
{
|
|||
|
|
CustomizeZoe_Screen.instance.OpenCustomization(indexThisResource);
|
|||
|
|
}
|
|||
|
|
}
|