45 lines
959 B
C#
45 lines
959 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
using UnityEngine.UI;
|
|
|
|
public class CustomItem : MonoBehaviour
|
|
{
|
|
/// <summary>
|
|
/// 海关编码
|
|
/// </summary>
|
|
public string Custom_Code;
|
|
public Image icon;
|
|
public Button btn;
|
|
public Text text;
|
|
public Sprite nochoseSprite;
|
|
public Sprite choseSprite;
|
|
|
|
/// <summary>
|
|
/// 市级
|
|
/// </summary>
|
|
public CityPanel shi_Panel;
|
|
|
|
private void Awake()
|
|
{
|
|
btn.onClick.AddListener(() =>
|
|
{
|
|
//进入市一级
|
|
shi_Panel.gameObject.SetActive(true);
|
|
shi_Panel.Init(Custom_Code);
|
|
FirstPanel.instance.sheng_Panel.SetActive(false);
|
|
});
|
|
}
|
|
|
|
public void PointIn(BaseEventData data)
|
|
{
|
|
icon.sprite = choseSprite;
|
|
}
|
|
|
|
public void PointOut(BaseEventData data)
|
|
{
|
|
icon.sprite = nochoseSprite;
|
|
}
|
|
}
|