34 lines
993 B
C#
34 lines
993 B
C#
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
using static PopUpWindowitem;
|
|||
|
|
|||
|
public class PopUpWindowitem : MonoBehaviour
|
|||
|
{
|
|||
|
public BoxTypeItem boxTypeItem = new BoxTypeItem();//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݶ<EFBFBD><DDB6><EFBFBD>
|
|||
|
|
|||
|
public GameObject titleObj;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
public GameObject contentObj;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
void Update()
|
|||
|
{
|
|||
|
if (titleObj != null) { titleObj.GetComponent<Text>().text = boxTypeItem.title; }
|
|||
|
if (contentObj != null) { contentObj.GetComponent<Text>().text = boxTypeItem.content; }
|
|||
|
}
|
|||
|
public void UpdateBoxTypeItem(BoxTypeItem _boxType)
|
|||
|
{
|
|||
|
boxTypeItem = _boxType;
|
|||
|
}
|
|||
|
public delegate void OnClikeWT(BoxTypeItem boxType, int type);//<2F>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ί<EFBFBD>лص<D0BB>
|
|||
|
public event OnClikeWT OnClike;//<2F><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
|
|||
|
public void onClikeAsync(int type = 0)//<2F><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
|
|||
|
{
|
|||
|
OnClike?.Invoke(boxTypeItem, type);
|
|||
|
}
|
|||
|
public void register_click(OnClikeWT onClikeWT)
|
|||
|
{
|
|||
|
OnClike += onClikeWT;
|
|||
|
}
|
|||
|
}
|