Files
Main/Assets/GameAssets/Resources/GameUI/Form/UIComponents/Scripts/UIIcon.cs

31 lines
820 B
C#
Raw Normal View History

2025-01-25 04:38:09 +08:00
//**********************************************//
//作者:#李云峰#
//日期:#2015.07.14#
//简述:#管理ICON的脚本#
//*********************************************//
using UnityEngine;
using System.Collections;
using Thousandto.Code.Center;
using Thousandto.Plugins.Common;
namespace Thousandto.GameUI.Form
{
/// <summary>
/// 使用此类其所属gameobject子对象必须有Icon
/// </summary>
public class UIIcon : UIIconBase
{
#region//虚函数
protected override UISprite OnLoadIconSprite()
{
var iconTrans = transform.Find("Icon");
if (iconTrans != null)
return iconTrans.GetComponent<UISprite>();
else
return transform.GetComponent<UISprite>();
}
#endregion
}
}