Exemple #1
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);
            }
        }
    }
Exemple #2
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);
    }
Exemple #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();
    }
Exemple #4
0
    /// <summary>
    /// 展示属性信息 by吴江
    /// </summary>
    /// <param name="_triggerUI"></param>
    /// <param name="_tag"></param>
    /// <param name="_value"></param>
    public static void ShowPropertyTooltip(GameObject _triggerUI, ActorPropertyTag _tag, int _value)
    {
        CloseAllTooltip();
        if (_tag == ActorPropertyTag.TOTAL)
        {
            return;
        }
        GUIBase panel = GetPanelByType(TooltipType.Property);

        if (panel == null)
        {
            return;
        }

        PropertyTooltip propertyTooltip = panel.GetComponent <PropertyTooltip>();

        if (propertyTooltip == null)
        {
            GameSys.LogError("在预制上找不到组件 : <EquipmentTooltip>!");
            return;
        }
        propertyTooltip.SetData(_tag, _value, _triggerUI);
        panel.OpenUI();
        SetPropertyTooltipPosition(panel.gameObject, _triggerUI);
    }
Exemple #5
0
    /// <summary>
    /// 显示和隐藏某个主界面
    /// </summary>
    protected void ShowSingleMain(string wndPrefab, bool _show)
    {
        GUIBase wnd = GameCenter.uIMng.GetGui <GUIBase>(wndPrefab);

        if (wnd != null)
        {
            UIPlayAnimation playAnimation = wnd.GetComponent <UIPlayAnimation>();
            if (playAnimation != null)
            {
                bool nowState = !stateDic.ContainsKey(wnd.name)?true:stateDic[wnd.name];                //当前显示状态
                if (_show == false && nowState == true)
                {
                    playAnimation.PlayForward();                    //此方向都是隐藏UI
                    stateDic[wnd.name] = false;
                }
                if (_show == true && nowState == false)
                {
                    playAnimation.PlayReverse();                    //此方向都是显示UI
                    stateDic[wnd.name] = true;
                }
                if (_show == true && nowState == true && !stateDic.ContainsKey(wnd.name))               //初始情况
                {
                    playAnimation.PlayReverse();
                    stateDic[wnd.name] = true;
                }
            }
        }
    }
    public void ChangeFriendFarmMode(bool isFriendFarmMode, Action callback = null)
    {
        if (FarmRoot.Instance.Camera.enabled != isFriendFarmMode)
        {
            GUIFace.instance.gameObject.SetActive(!isFriendFarmMode);
            GUIFaceIndicator.instance.gameObject.SetActive(!isFriendFarmMode);
            PartsMenu.instance.gameObject.SetActive(!isFriendFarmMode);
            FarmRoot.Instance.DigimonManager.SetFriendFarmMode(isFriendFarmMode);
            if (!isFriendFarmMode)
            {
                FarmCameraControlForCMD.Off();
                GUIManager.ShowBarrier();
            }
            else
            {
                FarmCameraControlForCMD.On();
                GUIManager.HideBarrier();
            }
        }
        if (FarmObject_DigiGarden.Instance != null && isFriendFarmMode)
        {
            FarmObject_DigiGarden.Instance.DisbledEvolveParticle();
            FarmObject_DigiGarden.Instance.SetGrowthPlate(false);
        }
        GUIBase gui = GUIManager.GetGUI("UIHome");

        if (null != gui)
        {
            GUIScreenHome component = gui.GetComponent <GUIScreenHome>();
            if (null != component)
            {
                component.CloseAllCampaignFacilityIcon();
                component.ShowCampaignFacilityIcon();
            }
        }
        if (callback != null)
        {
            callback();
        }
    }
Exemple #7
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();
    }