From 6bcbcf0494eceb60e2754c966d66bd531c5be2a9 Mon Sep 17 00:00:00 2001 From: yyl <yyl> Date: 星期二, 30 九月 2025 18:13:25 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts --- Main/System/Main/MainWin.cs | 27 ++++++++++++++++++++++++++- 1 files changed, 26 insertions(+), 1 deletions(-) diff --git a/Main/System/Main/MainWin.cs b/Main/System/Main/MainWin.cs index 8cacbdf..06de8d3 100644 --- a/Main/System/Main/MainWin.cs +++ b/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) -- Gitblit v1.8.0