| | |
| | | [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() |
| | |
| | | return; |
| | | } |
| | | |
| | | ClickAnimation(index); |
| | | // 更新当前选中的标签索引 |
| | | functionOrder = index; |
| | | |
| | |
| | | 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> |
| | |
| | | { |
| | | //主城界面 |
| | | fightOtherWinBG.SetActive(false); |
| | | fightOtherWinWarnImg.SetActive(false); |
| | | fightBG.SetActive(true); |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | void RefreshFightIng(bool isfighting = false) |
| | | { |
| | | if (isfighting) |