yyl
2 天以前 6bcbcf0494eceb60e2754c966d66bd531c5be2a9
Main/System/Main/MainWin.cs
@@ -24,9 +24,10 @@
    [SerializeField] Image fightHeroImg; //战斗显示英雄
    [SerializeField] ScaleTween fightHeroScale; //战斗显示英雄缩放
    [SerializeField] UIEffectPlayer fightEffect;
    [SerializeField] UIEffectPlayer openCloseAnim;
    [SerializeField] FillTween cdTween;
    public bool isFirstOpen = true; //首次打开
    public Text hammerText;
    protected override void InitComponent()
@@ -77,6 +78,7 @@
            return;
        }
        ClickAnimation(index);
        // 更新当前选中的标签索引
        functionOrder = index;
@@ -87,6 +89,27 @@
        OpenSubUIByTabIndex();
    }
    void ClickAnimation(int index)
    {
        if (isFirstOpen || (functionOrder != 0 && index == 0))
        {
            openCloseAnim.onComplete = () =>
            {
                openCloseAnim.SetEnabled(true);
            };
            openCloseAnim.PlayByArrIndex(1);
            isFirstOpen = false;
        }
        else if (functionOrder == 0 && index != 0)
        {
            openCloseAnim.onComplete = () =>
            {
                openCloseAnim.SetEnabled(true);
            };
            openCloseAnim.PlayByArrIndex(0);
        }
    }
    /// <summary>
@@ -224,6 +247,7 @@
        {
            //主城界面
            fightOtherWinBG.SetActive(false);
            fightOtherWinWarnImg.SetActive(false);
            fightBG.SetActive(true);
@@ -259,6 +283,7 @@
    }
    void RefreshFightIng(bool isfighting = false)
    {
        if (isfighting)