Beispiel #1
0
    /// <summary>
    /// 展示物品信息 by 贺丰
    /// </summary>
    /// <param name="_itemUI"></param>
    /// <param name="_left"></param>
    /// <param name="_middle"></param>
    /// <param name="_right"></param>
    /// <param name="_tiggerUI"></param>
    public static void ShowEquipmentTooltip(ItemUI _itemUI, ItemActionType _left, ItemActionType _middle, ItemActionType _right, ItemActionType _other, GameObject _tiggerUI = null)
    {
        CloseAllTooltip();
        EquipmentInfo info = _itemUI.EQInfo;

        if (info == null)
        {
            return;
        }
        GUIBase panel = GetPanelByType(TooltipType.Equipment);

        if (panel == null)
        {
            return;
        }
        EquipmentTooltip equipmentTooltip = panel.GetComponent <EquipmentTooltip>();

        if (equipmentTooltip == null)
        {
            GameSys.LogError("在预制上找不到组件 : <EquipmentTooltip>!");
            return;
        }
        //		Debug.Log("ShowEquipmentTooltip   热感");
        equipmentTooltip.mSyncTriggerChk = _itemUI.GetComponent <UIToggle>();
        equipmentTooltip.EquipmentInfo   = info;
        equipmentTooltip.SetActionBtn(_left, _middle, _right, _other);
        panel.OpenUI();
        //SetEquipTooltipPostion(panel.gameObject, _tiggerUI);
    }
Beispiel #2
0
    /// <summary>
    /// 展示物品信息  by吴江
    /// </summary>
    /// <param name="_info">装备信息</param>
    /// <param name="_left">左边功能按钮的行为类型</param>
    /// <param name="_middle">中间功能按钮的行为类型</param>
    /// <param name="_right">右边功能按钮的行为类型</param>
    /// <param name="_itemUI">展示界面的碰撞依据。为空的话则是物品控件本身</param>
    public static void ShowEquipmentTooltip(EquipmentInfo _info, ItemActionType _left, ItemActionType _middle, ItemActionType _right, ItemActionType _other, GameObject _tiggerUI = null)
    {
        CloseAllTooltip();
        if (_info == null)
        {
            return;
        }
        GUIBase panel = GetPanelByType(TooltipType.Equipment);

        if (panel == null)
        {
            return;
        }
        EquipmentTooltip equipmentTooltip = panel.GetComponent <EquipmentTooltip>();

        if (equipmentTooltip == null)
        {
            GameSys.LogError("在预制上找不到组件 : <EquipmentTooltip>!");
            return;
        }
        equipmentTooltip.EquipmentInfo = _info;
        equipmentTooltip.SetActionBtn(_left, _middle, _right, _other);
        panel.OpenUI();
        //SetEquipTooltipPostion(panel.gameObject, _tiggerUI);
        if (_info.IsEquip && _info.BelongTo != EquipmentBelongTo.EQUIP)
        {
            EquipmentInfo compareEquip = GameCenter.inventoryMng.GetEquipFromEquipDicBySlot(_info.Slot);
            if (compareEquip != null && _info.InstanceID != compareEquip.InstanceID)
            {
                ToolTipMng.ShowCompareEquipmentTooltip(compareEquip);
            }
        }
    }
Beispiel #3
0
    /// <summary>
    /// 展示物品信息  by邓成
    /// </summary>
    /// <param name="_info">装备信息</param>
    /// <param name="_left">左边功能按钮的行为类型</param>
    /// <param name="_middle">中间功能按钮的行为类型</param>
    /// <param name="_right">右边功能按钮的行为类型</param>
    /// <param name="_itemUI">展示界面的碰撞依据。为空的话则是物品控件本身</param>
    public static void ShowEquipmentTooltip(int _itemType)
    {
        CloseAllTooltip();
        EquipmentInfo info = new EquipmentInfo(_itemType, EquipmentBelongTo.PREVIEW);

        if (info == null)
        {
            return;
        }
        GUIBase panel = GetPanelByType(TooltipType.Equipment);

        if (panel == null)
        {
            return;
        }
        EquipmentTooltip equipmentTooltip = panel.GetComponent <EquipmentTooltip>();

        if (equipmentTooltip == null)
        {
            GameSys.LogError("在预制上找不到组件 : <EquipmentTooltip>!");
            return;
        }
        equipmentTooltip.EquipmentInfo = info;
        equipmentTooltip.SetActionBtn(ItemActionType.None, ItemActionType.None, ItemActionType.None);
        panel.OpenUI();
    }
Beispiel #4
0
    public static void ShowCompareEquipmentTooltip(EquipmentInfo _info, GameObject _tiggerUI = null)
    {
        if (_info == null)
        {
            return;
        }
        GUIBase panel = GetPanelByType(TooltipType.EquipmentCompare);

        if (panel == null)
        {
            return;
        }
        EquipmentTooltip equipmentTooltip = panel.GetComponent <EquipmentTooltip>();

        if (equipmentTooltip == null)
        {
            GameSys.LogError("在预制上找不到组件 : <EquipmentTooltip>!");
            return;
        }
        equipmentTooltip.EquipmentInfo = _info;
        equipmentTooltip.SetActionBtn(ItemActionType.None, ItemActionType.None, ItemActionType.None);
        panel.transform.localPosition = new Vector3(0, 0, -200);
        panel.OpenUI();
    }