You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
852 B
38 lines
852 B
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class RawImageButton : MonoBehaviour
|
|
{
|
|
private Button button;
|
|
private RawImage rawImage;
|
|
[Header("按钮序号")]
|
|
public int slotIndex;
|
|
|
|
public Image Hight;
|
|
|
|
[Header("楼道名称")]
|
|
public string NmaeText;
|
|
|
|
[Header("按钮是否处于按下过的状态")]
|
|
public bool isOpen;
|
|
void Start()
|
|
{
|
|
button = GetComponent<Button>();
|
|
rawImage = GetComponent<RawImage>();
|
|
button.onClick.AddListener(() =>
|
|
{
|
|
InventoryUI.Instance.rawImage.texture = rawImage.texture;
|
|
// 传序号进来打开对应按钮的高亮图片
|
|
InventoryUI.Instance.UpdateCameraHightlight(slotIndex);
|
|
});
|
|
}
|
|
|
|
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|