2024-11-27 22:38:52 +08:00
|
|
|
|
using System;
|
2024-11-27 17:27:53 +08:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using TMPro;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
public class addressItem : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
public TextMeshProUGUI nameTxt;//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
public TextMeshProUGUI addressTxt;//<2F><>ַ
|
|
|
|
|
public TextMeshProUGUI telTxt;//<2F>绰
|
|
|
|
|
public Button editBtn;//<2F>༭<EFBFBD><E0BCAD>ť
|
|
|
|
|
|
2024-11-27 22:38:52 +08:00
|
|
|
|
public GameObject editPanelPrefab;
|
|
|
|
|
public Transform trans;
|
|
|
|
|
|
2024-11-27 17:27:53 +08:00
|
|
|
|
// Start is called before the first frame update
|
|
|
|
|
void Start()
|
|
|
|
|
{
|
2024-11-27 22:38:52 +08:00
|
|
|
|
trans = GameObject.Find("Canvas").transform;
|
|
|
|
|
editBtn.onClick.AddListener(Edit);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Edit()
|
|
|
|
|
{
|
|
|
|
|
GameObject.Instantiate(editPanelPrefab, trans);
|
2024-11-27 17:27:53 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Update is called once per frame
|
|
|
|
|
void Update()
|
|
|
|
|
{
|
2024-11-27 22:38:52 +08:00
|
|
|
|
|
2024-11-27 17:27:53 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-27 19:02:29 +08:00
|
|
|
|
public void SetInfo(Address address)
|
2024-11-27 17:27:53 +08:00
|
|
|
|
{
|
2024-11-27 19:02:29 +08:00
|
|
|
|
nameTxt.text = address.receiveName;
|
|
|
|
|
addressTxt.text = address.address;
|
|
|
|
|
telTxt.text = address.receivePhone;
|
2024-11-27 17:27:53 +08:00
|
|
|
|
}
|
2024-11-27 22:38:52 +08:00
|
|
|
|
}
|