Files
Main/Assets/GameAssets/Resources/GameUI/Form/UIComponents/Scripts/UIIcon.cs
2025-01-25 04:38:09 +08:00

31 lines
820 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//**********************************************//
//作者:#李云峰#
//日期:#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
}
}