42 lines
934 B
C#
42 lines
934 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class addressItem : MonoBehaviour
|
|
{
|
|
public TextMeshProUGUI nameTxt;//Ãû³Æ
|
|
public TextMeshProUGUI addressTxt;//µØÖ·
|
|
public TextMeshProUGUI telTxt;//µç»°
|
|
public Button editBtn;//±à¼°´Å¥
|
|
|
|
public GameObject editPanelPrefab;
|
|
public Transform trans;
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
trans = GameObject.Find("Canvas").transform;
|
|
editBtn.onClick.AddListener(Edit);
|
|
}
|
|
|
|
public void Edit()
|
|
{
|
|
GameObject.Instantiate(editPanelPrefab, trans);
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
public void SetInfo(Address address)
|
|
{
|
|
nameTxt.text = address.receiveName;
|
|
addressTxt.text = address.address;
|
|
telTxt.text = address.receivePhone;
|
|
}
|
|
} |