41 lines
786 B
C#
41 lines
786 B
C#
|
|
using UnityEngine;
|
|||
|
|
using UnityEngine.UI;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ͷָ<CDB7><D6B8>UI
|
|||
|
|
/// </summary>
|
|||
|
|
public class ArrowObjUI : MonoBehaviour
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// ͼ<><CDBC>
|
|||
|
|
/// </summary>
|
|||
|
|
public Image iconImage;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public GameObject bkImage;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public GameObject arrowObj;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC>
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="sprite"></param>
|
|||
|
|
public void SetIconImage(Sprite sprite)
|
|||
|
|
{
|
|||
|
|
if (sprite == null)
|
|||
|
|
{
|
|||
|
|
bkImage.gameObject.SetActive(false);
|
|||
|
|
iconImage.gameObject.SetActive(false);
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
iconImage.sprite = sprite;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|