23 lines
584 B
C#
23 lines
584 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using ZXKFramework;
|
|
|
|
public class DragImg_Max : MonoBehaviour
|
|
{
|
|
public GameObject maxObj;
|
|
Image img1;
|
|
public void Start()
|
|
{
|
|
img1 = transform.parent.FindFirst<Image>("Image");
|
|
GetComponent<Button>().onClick.AddListener(() =>
|
|
{
|
|
maxObj.gameObject.SetActive(true);
|
|
Image img = maxObj.transform.FindFirst<Image>("Image");
|
|
img.gameObject.SetActive(true);
|
|
img.sprite = img1.sprite;
|
|
});
|
|
}
|
|
}
|