Пример #1
0
    /// <summary>
    /// 设置Icon image方图
    /// </summary>
    /// <param name="image">image</param>
    /// <param name="IconId">Icon表Tid</param>
    public static void SetIconImageSquare(Image image, uint IconId, bool autoSetNativeSize = false)
    {
        CfgEternityProxy cfgEternityProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy;
        Icon             icon             = cfgEternityProxy.GetIconName(IconId);

        SetIconImage(image, icon.Atlas, icon.SquareName, autoSetNativeSize);
    }
Пример #2
0
    /// <summary>
    /// 获取物品Bundle
    /// </summary>
    /// <param name="itemType">物品类型</param>
    /// <param name="itemID">配置表ID</param>
    /// <returns></returns>
    public static string GetItemIconBundle(uint itemID)
    {
        CfgEternityProxy cfgEternityProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy;
        uint             iconId           = cfgEternityProxy.GetItemByKey(itemID).Icon;

        return(cfgEternityProxy.GetIconName(iconId).Atlas);
    }
Пример #3
0
    private void UpdateIcon()
    {
        uint IconId = (uint)m_CfgEternityProxy.GetMissionIconIdBy(m_MissionVO.MissionType);
        Icon icon   = m_CfgEternityProxy.GetIconName(IconId);

        UIUtil.SetIconImage(m_IconBg, icon.Atlas, icon.SquareName);
    }
Пример #4
0
    /// <summary>
    /// 通过IconID 获取Icon的资源名称
    /// </summary>
    /// <param name="iconID"></param>
    /// <returns></returns>
    public static string GetIconAsset(uint iconID)
    {
        CfgEternityProxy cfgEternityProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy;

        return(cfgEternityProxy.GetIconName(iconID).AssetName);
    }