| | |
| | | [SerializeField] UIEffectPlayer fightEffect; |
| | | [SerializeField] UIEffectPlayer openCloseAnim; |
| | | [SerializeField] FillTween cdTween; |
| | | [SerializeField] Transform nextCantAttackMask; |
| | | [SerializeField] Text hammerText; |
| | | [SerializeField] Text multiFightText; |
| | | |
| | |
| | | AutoFightModel.Instance.OnFightEvent += OnSkillCast; |
| | | RenameManager.Instance.OnUpdateRenameResultEvent += OnUpdateRenameResultEvent; |
| | | UIManager.Instance.OnCloseWindow += OnCloseWindow; |
| | | GlobalTimeEvent.Instance.MSEvent += OnMSEvent; |
| | | base.OnPreOpen(); |
| | | |
| | | // 刷新UI |
| | |
| | | AutoFightModel.Instance.OnFightEvent -= OnSkillCast; |
| | | RenameManager.Instance.OnUpdateRenameResultEvent -= OnUpdateRenameResultEvent; |
| | | UIManager.Instance.OnCloseWindow -= OnCloseWindow; |
| | | GlobalTimeEvent.Instance.MSEvent -= OnMSEvent; |
| | | |
| | | base.OnPreClose(); |
| | | isForcePlayFightUIAnim = true; |
| | | } |
| | |
| | | if (isfighting) |
| | | { |
| | | fightEffect.Play(); |
| | | nextCantAttackMask.localScale = Vector3.zero; |
| | | cdTween.SetStartState(); |
| | | cdTween.Play(() => |
| | | { |
| | |
| | | { |
| | | AutoFightModel.Instance.fightingHeroSkinID = tmpHero.SkinID; |
| | | fightHeroImg.SetOrgSprite(HeroSkinConfig.Get(AutoFightModel.Instance.fightingHeroSkinID).SquareIcon, "HeroHead"); |
| | | nextCantAttackMask.localScale = Vector3.one; |
| | | } |
| | | }); |
| | | fightHeroScale.SetStartState(); |
| | |
| | | fightHeroImg.SetOrgSprite(HeroSkinConfig.Get(AutoFightModel.Instance.fightingHeroSkinID).SquareIcon, "HeroHead"); |
| | | } |
| | | |
| | | void OnMSEvent() |
| | | { |
| | | if (nextCantAttackMask.localScale == Vector3.one) |
| | | { |
| | | if (BattleManager.Instance.storyBattleField.IsCanRequestFight()) |
| | | { |
| | | nextCantAttackMask.localScale = Vector3.zero; |
| | | } |
| | | } |
| | | } |
| | | |
| | | void OnSkillCast(bool isfighting) |
| | | { |
| | | |