| | |
| | | using System.Collections.Generic; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using LitJson; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | |
| | | tianziDamageBar.ValueChangeAction += OnValueChangeAction; |
| | | tianziDamageBar.ChangeEndAction += OnChangeEndAction; |
| | | TianziBillboradManager.Instance.OnUpdateBarInfoEvent += OnUpdateBarInfoEvent; |
| | | TianziBillboradManager.Instance.PlayUiEffectAction += OnPlayUiEffectAction; |
| | | MainWin.TabChangeEvent += OnTabChangeEvent; |
| | | bool isOpenBattleChangeTab = IsOpenBattleChangeTab(); |
| | | transButtons.localPosition = new Vector3(0, isOpenBattleChangeTab ? 130 : 0, 0); |
| | |
| | | } |
| | | } |
| | | |
| | | private void OnPlayUiEffectAction() |
| | | { |
| | | uiEffectPlayer.Play(); |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | base.OnPreClose(); |
| | |
| | | tianziDamageBar.ValueChangeAction -= OnValueChangeAction; |
| | | tianziDamageBar.ChangeEndAction -= OnChangeEndAction; |
| | | TianziBillboradManager.Instance.OnUpdateBarInfoEvent -= OnUpdateBarInfoEvent; |
| | | TianziBillboradManager.Instance.PlayUiEffectAction -= OnPlayUiEffectAction; |
| | | MainWin.TabChangeEvent -= OnTabChangeEvent; |
| | | bool isOpenBattleChangeTab = IsOpenBattleChangeTab(); |
| | | if (isOpenBattleChangeTab) |
| | |
| | | GameObject hero = bossBattleObject.heroGo; |
| | | if (hero == null || stage <= 1) |
| | | return; |
| | | uiEffectPlayer.Play(); |
| | | |
| | | |
| | | GameObject prefab = UIUtility.CreateWidget("TianziBillboradBox", "TianziBillboradBox"); |
| | | prefab.transform.SetParentEx(hero.transform, Vector3.zero, Quaternion.identity, Vector3.one); |