using DG.Tweening; using ET.EventType; using ET; using System; using System.Collections.Generic; using FairyGUI; namespace ET { // public class UpdateHeadInfo_ChangeMaxHpEvent : AEvent_Sync // { // public override void Run(UpdateHeadInfo_ChangeMaxHp args) // { // long id = args.unit.Id; // float tweenTime = args.duration; // var zoneScene = args.zoneScene; // //!玩家的UI // if (id == zoneScene.GetComponent().MyId) // { // if (!(FUIComponent.Instance.Get(FUIPackage.Common_MainUI) is FUI_MainUI ui)) // { // return; // } // GProgressBar hpBar = ui.m_mineHeadInfo.m_pBarHp; // DOTween.To(() => (float)hpBar.max, x => hpBar.max = x, args.value, tweenTime).SetEase(Ease.InOutQuad); // } // else // { // //!队友的UI // if (UpdateTeamHeadInfoEvent.TeamMemberHeadInfoDic.TryGetValue(id, out FUI_HeadInfoItem ui)) // { // GProgressBar hpBar = ui.m_pBarHp; // DOTween.To(() => (float)hpBar.max, x => hpBar.max = x, args.value, tweenTime).SetEase(Ease.InOutQuad); // } // } // } // } }